• Home
  • Raw
  • Download

Lines Matching +refs:po +refs:find +refs:span +refs:of +refs:entry

102    # TODO(GYP): Figure out which of these should (and can) build
466 // also a tiny amount of extent metadata.
715 +// Use of this source code is governed by a BSD-style license that can be
745 + *result = FilePath(bundle_path + "/entry/resources/rawfile");
747 + *result = FilePath(bundle_path + "/nweb/entry/resources/rawfile");
805 +// Use of this source code is governed by a BSD-style license that can be
832 // of lacros-chrome is complete.
864 // of lacros-chrome is complete.
1013 +// Use of this source code is governed by a BSD-style license that can be
1137 + // the number of characters needed until we are done converting.
1228 + // Subtract by one as return address of function may be in the next
1294 + // Subtract one as return address of function may be in the next
1316 + // The format below intentionally matches that of Android's debuggerd
1365 // creation time is included as st_birthtime, the rest of POSIX platforms have
1396 // instead of pwrite().
1432 // the directory |path|, in the number of FilePath::CharType, or -1 on failure.
1438 // Broad categories of file systems as returned by statfs() on Linux.
1494 // Enables or disables enforcement of FD ownership as tracked by ScopedFD
1501 // Queries the ownership status of an FD, i.e. whether it is currently owned by
1588 // Skip the final character of |str_newline|, since LogMessage() will add
1618 // and Android to indicate that this type of behavior can be expected on
1742 +#error "Unable to find syscall for __NR_timerfd_create"
2280 // Signal handling in this function assumes the creation of a new
2397 // Threads that have already terminated will not be reported. Thus, the sum of
2405 // Bytes of swap as reported by /proc/[pid]/status.
2450 // This provides an estimate of available memory as described here:
2468 // Parse the data found in /proc/<pid>/stat and return the sum of the
3006 +/* Name of package */
3012 +/* Define to the full name of this package. */
3015 +/* Define to the full name and version of this package. */
3018 +/* Define to the one symbol short name of this package. */
3021 +/* Define to the version of this package. */
3024 +/* The size of `int', as computed by sizeof. */
3027 +/* The size of `long', as computed by sizeof. */
3030 +/* The size of `long long', as computed by sizeof. */
3033 +/* The size of `short', as computed by sizeof. */
3042 +/* Version number of package */
3286 +/* Numeric representation of the version */
3289 +/* Name of package */
3295 +/* Define to the full name of this package. */
3298 +/* Define to the full name and version of this package. */
3301 +/* Define to the one symbol short name of this package. */
3307 +/* Define to the version of this package. */
3310 +/* The size of `int', as computed by sizeof. */
3313 +/* The size of `long', as computed by sizeof. */
3316 +/* The size of `long long', as computed by sizeof. */
3319 +/* The size of `short', as computed by sizeof. */
3328 +/* Version number of package */
3363 // change the priority of a thread in a different process and will fail
3392 +// Phase indicates the nature of an event entry. E.g. part of a begin/end pair.
3419 +// Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT.
3452 +// Enum reflecting the scope of an INSTANT event. Must fit within
3756 // Records the values of a multi-parted counter called "name" immediately.
3757 // The UI will treat value1 and value2 as parts of a whole, displaying their
3799 + * You may obtain a copy of the License at
3906 + * You may obtain a copy of the License at
4270 "-plugin-arg-find-bad-constructs",
4307 # the space overhead is too great. We should use some mixture of profiles and
4378 # the behavior of the Android NDK from earlier versions.
4454 # Makes builds independent of absolute file path.
4583 # On Android we kind of optimize some things that don't affect debugging
4607 # -fdebug-info-for-profiling enables that (and a bunch of other things we
4746 +# Use of this source code is governed by a BSD-style license that can be
4993 + # arm builds of libc++ starting in NDK r12 depend on unwind.
5012 + cflags = [ "-finstrument-function-entry-bare" ]
5025 +# Use of this source code is governed by a BSD-style license that can be
5079 +# Use of this source code is governed by a BSD-style license that can be
5381 # These both have a peak usage of < 2GB, but that is still large enough for
5400 # Use -MD instead of -MMD for compiler commands. This is useful for tracking
5401 # the comprehensive set of dependencies.
5427 +# Use of this source code is governed by a BSD-style license that can be
5443 +# The ohos clang toolchains share most of the same parameters, so we have this
5444 +# wrapper around gcc_toolchain to avoid duplication of logic.
5448 +# Prefix of compiler executables.
5563 // Use of this source code is governed by a BSD-style license that can be
5777 // Use of this source code is governed by a BSD-style license that can be
5796 // Use of this source code is governed by a BSD-style license that can be
5799 // set of VisualProperties arriving. See WidgetBase::UpdateVisualProperties.
7099 # Part of //ui/base:test_support which is testingonly.
7111 # Part of //ui/aura:test_support which is testingonly.
7114 # Part of //ui/base:test_support which is testingonly.
7120 # Part of //ui/aura:test_support which is testingonly.
7125 # Part of //ui/events:test_support which is testingonly.
7129 # Part of //ui/ozone::ui_test_support which is testingonly.
7136 # Part of //ui/views:test_support which is testingonly.
7150 + # Part of //ui/aura:test_support which is testingonly.
7152 # Part of //ui/base/x:test_support which is testingonly.
7156 - # Part of //ui/aura:test_support which is testingonly.
7159 # Part of //ui/ozone/platform/x11:test_support which is testingonly.
7164 # Part of //ui/base:test_support which is testingonly.
7167 # Part of //ui//events:test_support which is testingonly.
7176 + # Part of //ui/aura:test_support which is testingonly.
7180 + # Part of //ui/events:test_support which is testingonly.
7190 # Part of //ui/base:test_support which is testingonly.
7193 # Part of //ui//events:test_support which is testingonly.
7306 # List of all C API files that will be checked for changes by cef_api_hash.py.
7377 # Add the SwiftShader .dylibs in the MODULE_DIR of the Framework app bundle.
8510 + // Recompute the WebPreferences based on the current state of the CefSettings,
8601 + // Set the callback of the port.
8635 + // history entry. optional_param=baseUrl, optional_param=data,
8672 - // B. The client receives a "commit" signal of GtkIMContext (on Linux), or;
8673 - // C. insertText of NSTextInput is called (on Mac).
8674 + // B. The client receives a "commit" signal of GtkIMContext (on Linux),
8675 + // or; C. insertText of NSTextInput is called (on Mac).
8685 + // Execute a string of JavaScript code, return result by callback
8739 +// Structure to implement to be notified of asynchronous completion via
8750 + // number of cookies that were deleted.
8758 +// Structure to implement to be notified of asynchronous completion via
8904 // Return the handler for find result events.
8947 // Return the handler for browser life span events.
8996 // a reference to |message| outside of this callback.
9010 + // Returns the list of arguments NotifyJavaScriptResult.
9050 +// Callback structure used for continuation of custom quick menu display.
9073 // Implement this structure to handle context menu events. The functions of this
9081 + // Called to allow custom display of the quick menu for a windowless browser.
9082 + // |location| is the top left corner of the selected region. |size| is the
9083 + // size of the selected region. |edit_state_flags| is a combination of flags
9084 + // that represent the state of the quick menu. Return true (1) if the menu
9113 + // irregardless of whether the menu was canceled or a command was selected.
9169 + // Gets whether cookies of third parties are allowed to be set. Returns false
9176 + // Set whether cookies of third parties are allowed to be set.
9222 // Structure to implement for visiting cookie values. The functions of this
9251 +// * Redistributions of source code must retain the above copyright
9252 +// notice, this list of conditions and the following disclaimer.
9254 +// copyright notice, this list of conditions and the following disclaimer
9257 +// * Neither the name of Google Inc. nor the name Chromium Embedded
9258 +// Framework nor the names of its contributors may be used to endorse
9370 + // obtains all origins of a specified permission type.
9492 + // name to value. Note that if this map contains any of the headers that are
9624 +// * Redistributions of source code must retain the above copyright
9625 +// notice, this list of conditions and the following disclaimer.
9627 +// copyright notice, this list of conditions and the following disclaimer
9630 +// * Neither the name of Google Inc. nor the name Chromium Embedded
9631 +// Framework nor the names of its contributors may be used to endorse
9857 + // Called to retrieve the size of the touch handle for the specified
9903 // range of characters that have been selected. |character_bounds| is the
9906 // specified |browser|. |input_mode| specifies what kind of keyboard should be
9975 + // of handling cef_request_handler_t::on_select_client_certificate(). If
10023 // functions of this structure will be called on the thread indicated.
10045 +// * Redistributions of source code must retain the above copyright
10046 +// notice, this list of conditions and the following disclaimer.
10048 +// copyright notice, this list of conditions and the following disclaimer
10051 +// * Neither the name of Google Inc. nor the name Chromium Embedded
10052 +// Framework nor the names of its contributors may be used to endorse
10092 +// Structure used for managing storage. The functions of this structure may be
10128 + // Gets the amount of storage currently being used by the Web SQL Database
10144 +// Structure to implement to be notified of asynchronous completion via
10178 +// Structure to implement to be notified of asynchronous completion via
10390 + // Recompute the WebPreferences based on the current state of the CefSettings,
10474 - // of ranges that will be underlined in the resulting text.
10475 - // |replacement_range| is an optional range of the existing text that will be
10476 - // replaced. |selection_range| is an optional range of the resulting text that
10491 + // Set the callback of the port.
10526 + // history entry.
10558 + // an optional set of ranges that will be underlined in the resulting
10559 + // text. |replacement_range| is an optional range of the existing text
10560 + // that will be replaced. |selection_range| is an optional range of the
10579 - // B. The client receives a "commit" signal of GtkIMContext (on Linux), or;
10580 - // C. insertText of NSTextInput is called (on Mac).
10581 + // B. The client receives a "commit" signal of GtkIMContext (on Linux),
10582 + // or; C. insertText of NSTextInput is called (on Mac).
10592 + // Execute a string of JavaScript code, return result by callback
10643 +// Interface to implement to be notified of asynchronous completion via
10651 + // number of cookies that were deleted.
10659 +// Interface to implement to be notified of asynchronous completion via
10743 + // Returns the list of arguments NotifyJavaScriptResult.
10767 +// * Redistributions of source code must retain the above copyright
10768 +// notice, this list of conditions and the following disclaimer.
10770 +// copyright notice, this list of conditions and the following disclaimer
10773 +// * Neither the name of Google Inc. nor the name Chromium Embedded
10774 +// Framework nor the names of its contributors may be used to endorse
10834 +// Callback interface used for continuation of custom quick menu display.
10854 // Implement this interface to handle context menu events. The methods of this
10870 + // Called to allow custom display of the quick menu for a windowless browser.
10871 + // |location| is the top left corner of the selected region. |size| is the
10872 + // size of the selected region. |edit_state_flags| is a combination of flags
10873 + // that represent the state of the quick menu. Return true if the menu will be
10903 + // irregardless of whether the menu was canceled or a command was selected.
10957 + // Gets whether cookies of third parties are allowed to be set. Returns false
10964 + // Set whether cookies of third parties are allowed to be set.
11021 +// * Redistributions of source code must retain the above copyright
11022 +// notice, this list of conditions and the following disclaimer.
11024 +// copyright notice, this list of conditions and the following disclaimer
11027 +// * Neither the name of Google Inc. nor the name Chromium Embedded
11028 +// Framework nor the names of its contributors may be used to endorse
11046 +// The contents of this file must follow a specific format in order to
11136 + // obtains all origins of a specified permission type.
11144 \ No newline at end of file
11222 + // from name to value. Note that if this map contains any of the headers that
11344 +// Use of this source code is governed by a BSD-style license that can be
11492 \ No newline at end of file
11502 + // Called to retrieve the size of the touch handle for the specified
11546 // range of characters that have been selected. |character_bounds| is the
11549 // specified |browser|. |input_mode| specifies what kind of keyboard
11608 + // as part of handling CefRequestHandler::OnSelectClientCertificate().
11643 // methods of this class will be called on the thread indicated.
11660 +// Use of this source code is governed by a BSD-style license that can be
11675 +// Class used for managing storage. The methods of this class may be called on
11716 + // Gets the amount of storage currently being used by the Web SQL Database
11726 +// Interface to implement to be notified of asynchronous completion via
11758 +// Interface to implement to be notified of asynchronous completion via
11944 // Align the text's right edge with that of its display area.
11960 +// Values indicating what state of the touch handle is set.
11978 + // Combination of cef_touch_handle_state_flags_t values indicating what state
12119 +// Class representing the state of a touch handle.
12132 -// Use of this source code is governed by a BSD-style license that can be
12136 +// reserved. Use of this source code is governed by a BSD-style license that can
12166 -// Use of this source code is governed by a BSD-style license that can be
12170 +// reserved. Use of this source code is governed by a BSD-style license that can
12191 -// Use of this source code is governed by a BSD-style license that can be
12195 +// reserved. Use of this source code is governed by a BSD-style license that can
12420 -// Use of this source code is governed by a BSD-style license that can be
12424 +// reserved. Use of this source code is governed by a BSD-style license that can
12567 + * You may obtain a copy of the License at
12587 +// Note: this implementation of AcquirePrivateKey will always call the callback
12607 \ No newline at end of file
12618 + * You may obtain a copy of the License at
12643 + auto it = denieds_.find(host_port);
12670 + auto it = certs_.find(host_port);
12692 + * You may obtain a copy of the License at
13503 + * You may obtain a copy of the License at
13547 + base::span<const uint8_t> input,
13590 \ No newline at end of file
13598 +// Use of this source code is governed by a BSD-style license that can be
13626 +// Use of this source code is governed by a BSD-style license that can be
13775 +// The amount of time to disallow repeated pointer lock calls after the user
14097 -// Use of this source code is governed by a BSD-style license that can be
14101 +// reserved. Use of this source code is governed by a BSD-style license that can
14274 -// Use of this source code is governed by a BSD-style license that can be
14278 +// reserved. Use of this source code is governed by a BSD-style license that can
14427 return new CefNavigationEntryImpl(entry);
14933 +// WebMessagePort>> portMap_; first is the paif of port_handles. second is the
14934 +// WebMessagePort of the pipe.
14957 +// WebMessagePort>> portMap_; first is the paif of port_handles. second is the
14958 +// WebMessagePort of the pipe.
14972 + auto found = postedPorts_.find(port.ToString());
14979 + // find the WebMessagePort by port_handle, and send to html5
15002 +// WebMessagePort>> portMap_; first is the paif of port_handles. second is the
15003 +// WebMessagePort of the pipe.
15011 + // find port and close, then erase the item in map
15054 + // find the WebMessagePort in map
15077 +// WebMessagePort>> portMap_; first is the paif of port_handles. second is the
15078 +// WebMessagePort of the pipe.
15091 + auto runner_it = runnerMap_.find(pointer0);
15101 + auto receive_it = receiverMap_.find(pointer0);
15109 + // find the port set message callback
15246 + if (!(url.find("data:") == 0)) {
15381 -// Use of this source code is governed by a BSD-style license that can be
15385 +// reserved. Use of this source code is governed by a BSD-style license that can
15469 // Interface to implement for observers that wish to be informed of changes
16228 // Notification that a move or resize of the renderer's containing window has
16265 +// Use of this source code is governed by a BSD-style license that can be
16442 +// Use of this source code is governed by a BSD-style license that can be
16519 // Returns the skia representation of this Image.
16538 +// Use of this source code is governed by a BSD-style license that can be
16711 + // |name| may come from |named_objects_|. Make a copy of name so that if
16735 + if (method_map_.find(object_id) == method_map_.end()) {
16750 + if (method_map_.find(object_id) == method_map_.end()) {
16756 + if (p.second.find(method_name) == p.second.end()) {
16807 + if (method_map_.find(object_id) == method_map_.end()) {
16833 \ No newline at end of file
16842 +// Use of this source code is governed by a BSD-style license that can be
16917 \ No newline at end of file
16926 +// Use of this source code is governed by a BSD-style license that can be
17058 + auto iter = hosts_.find(current_routing_id_);
17108 \ No newline at end of file
17117 +// Use of this source code is governed by a BSD-style license that can be
17202 + // The routing id of the RenderFrameHost whose request we are processing.
17208 \ No newline at end of file
17217 +// Use of this source code is governed by a BSD-style license that can be
17339 + auto iter = hosts_.find(current_routing_id_);
17351 \ No newline at end of file
17360 +// Use of this source code is governed by a BSD-style license that can be
17437 + // The routing id of the RenderFrameHost whose request we are processing.
17451 +// Use of this source code is governed by a BSD-style license that can be
17491 +// Use of this source code is governed by a BSD-style license that can be
17528 \ No newline at end of file
17619 +// Use of this source code is governed by a BSD-style license that can be
17791 +// Use of this source code is governed by a BSD-style license that can be
17850 +// Use of this source code is governed by a BSD-style license that can be
17879 + auto it = g_AddrInfoMap.find(hostname);
17901 \ No newline at end of file
17909 +// Use of this source code is governed by a BSD-style license that can be
18354 // Implementation of the CefCookieManager interface. May be created on any
18510 +// Use of this source code is governed by a BSD-style license that can be
18589 + // Part of implementation of NWebPreference.allowContentAccess.
18593 + // Part of implementation of NWebPreference.allowFileAccess.
18625 +// Use of this source code is governed by a BSD-style license that can be
18713 // Owns all of the ProxyURLLoaderFactorys for a given BrowserContext. Since
18812 -// Copyright (c) 2018 The Chromium Authors. All rights reserved. Use of this
18817 +// reserved. Use of this source code is governed by a BSD-style license that can
18858 -// reserved. Use of this source code is governed by a BSD-style license that
18862 +// reserved. Use of this source code is governed by a BSD-style license that can
19035 -// reserved. Use of this source code is governed by a BSD-style license that
19039 +// reserved. Use of this source code is governed by a BSD-style license that can
19051 +// Use of this source code is governed by a BSD-style license that can be
19248 +// Use of this source code is governed by a BSD-style license that can be
19382 -// Use of this source code is governed by a BSD-style license that can be
19386 +// reserved. Use of this source code is governed by a BSD-style license that can
19420 // The maximum number of damage rects to cache for outstanding frame requests
19540 + auto it = accelerate_widget_map_.find(browser_impl_->GetAcceleratedWidget());
19572 + auto it = compositor_map_.find(browser_impl_->GetAcceleratedWidget());
19893 // out-of-process iframes), pick the one that should process this event.
20090 + auto it = CefRenderWidgetHostViewOSR::compositor_map_.find(widget);
20103 -// Use of this source code is governed by a BSD-style license that can be
20107 +// reserved. Use of this source code is governed by a BSD-style license that can
20225 // The background color of the web content.
20263 +// Use of this source code is governed by a BSD-style license that can be
20378 \ No newline at end of file
20387 +// Use of this source code is governed by a BSD-style license that can be
20437 + // Origin position of the handle set via SetOrigin, in coordinate space of
20449 \ No newline at end of file
20458 +// Use of this source code is governed by a BSD-style license that can be
21083 +// Use of this source code is governed by a BSD-style license that can be
21105 +// An implementation of |TouchSelectionControllerClient| to be used in OSR's
21106 +// implementation of touch selection for contents.
21196 + // Not owned, non-null for the lifetime of this object.
21220 + // Keep track of which client interface to use.
21240 \ No newline at end of file
21248 +// Use of this source code is governed by a BSD-style license that can be
21273 \ No newline at end of file
21281 +// Use of this source code is governed by a BSD-style license that can be
21335 +// Use of this source code is governed by a BSD-style license that can be
21391 +// Use of this source code is governed by a BSD-style license that can be
21431 +// Use of this source code is governed by a BSD-style license that can be
21484 + return permission_index_map_.find(type) != permission_index_map_.end();
21496 + auto result = permission_index_map_.find(type);
21507 + auto result = permission_index_map_.find(type);
21584 + // Keep copy of pointer for performing further operations after ownership is
21861 +// Use of this source code is governed by a BSD-style license that can be
21940 + // should be run regardless of whether the class is still alive so the method
21960 +// Use of this source code is governed by a BSD-style license that can be
21975 + content::NavigationEntry* entry =
21977 + return entry ? entry->GetUniqueID() : 0;
22048 + LOG(ERROR) << "The origin of preauthorization is empty, ignore it.";
22057 + const ui::PageTransition transition = details.entry->GetTransitionType();
22060 + contents_unique_id_ != details.entry->GetUniqueID()) {
22062 + contents_unique_id_ = details.entry->GetUniqueID();
22077 + std::map<CefString, int>::iterator i = preauthorized_permission_.find(origin);
22081 \ No newline at end of file
22089 +// Use of this source code is governed by a BSD-style license that can be
22149 + // A list of ongoing requests.
22154 + // The unique id of the active NavigationEntry of the WebContents that we were
22168 // reserved. Use of this source code is governed by a BSD-style license that can
22274 // reserved. Use of this source code is governed by a BSD-style license that can
22454 +// Use of this source code is governed by a BSD-style license that can be
22832 +// Use of this source code is governed by a BSD-style license that can be
22846 +// Implementation of the CefWebStorage interface. May be created on any
23043 +// Use of this source code is governed by a BSD-style license that can be
23066 + return "The type of the object passed to the method is incompatible "
23067 + "with the type of method's argument";
23075 \ No newline at end of file
23084 +// Use of this source code is governed by a BSD-style license that can be
23115 +// Use of this source code is governed by a BSD-style license that can be
23142 \ No newline at end of file
23151 +// Use of this source code is governed by a BSD-style license that can be
23155 \ No newline at end of file
23164 +// Use of this source code is governed by a BSD-style license that can be
23195 +// Sent from renderer to browser to find out, if an object has a method with
23211 \ No newline at end of file
23220 +// Use of this source code is governed by a BSD-style license that can be
23225 +#include "base/containers/span.h"
23229 +// The magic value is only used to prevent accidental attempts of reading
23373 +// Use of this source code is governed by a BSD-style license that can be
23386 +// In Javascript Bridge, we need to pass some kinds of values that can't
23437 \ No newline at end of file
23485 // Move or resize of the renderer's containing window has started. Used on
23614 - return std::find(supported_scale_factors.begin(),
23622 + return std::find(supported_scale_factors.begin(),
23637 +// Use of this source code is governed by a BSD-style license that can be
23702 \ No newline at end of file
23711 +// Use of this source code is governed by a BSD-style license that can be
23739 \ No newline at end of file
23770 +// Use of this source code is governed by a BSD-style license that can be
23801 +// Use of this source code is governed by a BSD-style license that can be
23810 +// NWeb implementation of blink::WebContentSettingsClient.
23882 // We use the document element's text instead of the body text here because
23904 -// Use of this source code is governed by a BSD-style license that can be
23908 +// reserved. Use of this source code is governed by a BSD-style license that can
23992 -// Use of this source code is governed by a BSD-style license that can be
23996 +// reserved. Use of this source code is governed by a BSD-style license that can
24037 // ID of the browser that this RenderView is associated with. During loading
24038 // of cross-origin requests multiple RenderViews may be associated with the
24061 // Length of time to wait for the browser connection ACK before timing out.
24406 +// Use of this source code is governed by a BSD-style license that can be
24471 + // Removal becomes in effect on next reload. We simply removing the entry
24473 + NamedObjectMap::iterator iter = named_objects_.find(name);
24530 + // Ignore cleaning up of old object wrappers.
24550 +// Use of this source code is governed by a BSD-style license that can be
24621 +// Use of this source code is governed by a BSD-style license that can be
24658 + // WrappableBase instance deletes itself in case of a wrapper
24693 + // thus it's OK to send the message with a routing id of a ceased frame.
24711 + known_methods_.find(property);
24752 \ No newline at end of file
24761 +// Use of this source code is governed by a BSD-style license that can be
24843 +// Use of this source code is governed by a BSD-style license that can be
25027 +// Use of this source code is governed by a BSD-style license that can be
25080 +// Use of this source code is governed by a BSD-style license that can be
25197 +// Use of this source code is governed by a BSD-style license that can be
25278 // appropriate overloaded function based on the function type of strerror_r.
25294 +// reserved. Use of this source code is governed by a BSD-style license that
25300 +// hand only do so within the body of existing method and function
25402 +// reserved. Use of this source code is governed by a BSD-style license that
25408 +// hand only do so within the body of existing method and function
26470 +// reserved. Use of this source code is governed by a BSD-style license that
26476 +// hand only do so within the body of existing method and function
26689 +// reserved. Use of this source code is governed by a BSD-style license that
26695 +// hand only do so within the body of existing method and function
27557 +// reserved. Use of this source code is governed by a BSD-style license that
27563 +// hand only do so within the body of existing method and function
27855 +// reserved. Use of this source code is governed by a BSD-style license that
27861 +// hand only do so within the body of existing method and function
28123 +// reserved. Use of this source code is governed by a BSD-style license that
28129 +// hand only do so within the body of existing method and function
28267 +// reserved. Use of this source code is governed by a BSD-style license that
28273 +// hand only do so within the body of existing method and function
28311 +// reserved. Use of this source code is governed by a BSD-style license that
28317 +// hand only do so within the body of existing method and function
28386 +// reserved. Use of this source code is governed by a BSD-style license that
28392 +// hand only do so within the body of existing method and function
28430 +// reserved. Use of this source code is governed by a BSD-style license that
28436 +// hand only do so within the body of existing method and function
28585 +// reserved. Use of this source code is governed by a BSD-style license that
28591 +// hand only do so within the body of existing method and function
28629 +// reserved. Use of this source code is governed by a BSD-style license that
28635 +// hand only do so within the body of existing method and function
28707 +// reserved. Use of this source code is governed by a BSD-style license that
28713 +// hand only do so within the body of existing method and function
28991 +// reserved. Use of this source code is governed by a BSD-style license that
28997 +// hand only do so within the body of existing method and function
29114 +// reserved. Use of this source code is governed by a BSD-style license that
29120 +// hand only do so within the body of existing method and function
29524 +// reserved. Use of this source code is governed by a BSD-style license that
29530 +// hand only do so within the body of existing method and function
29613 +// reserved. Use of this source code is governed by a BSD-style license that
29619 +// hand only do so within the body of existing method and function
29766 +// reserved. Use of this source code is governed by a BSD-style license that
29772 +// hand only do so within the body of existing method and function
29844 +// reserved. Use of this source code is governed by a BSD-style license that
29850 +// hand only do so within the body of existing method and function
29890 +// reserved. Use of this source code is governed by a BSD-style license that
29896 +// hand only do so within the body of existing method and function
30040 +// reserved. Use of this source code is governed by a BSD-style license that
30046 +// hand only do so within the body of existing method and function
30083 +// reserved. Use of this source code is governed by a BSD-style license that
30089 +// hand only do so within the body of existing method and function
30181 +// reserved. Use of this source code is governed by a BSD-style license that
30187 +// hand only do so within the body of existing method and function
30554 - _struct->find(_struct, searchText.GetStruct(), forward, matchCase, findNext);
30555 + _struct->find(_struct, searchText.GetStruct(), forward, matchCase, findNext,
31278 +// reserved. Use of this source code is governed by a BSD-style license that
31284 +// hand only do so within the body of existing method and function
31475 +// reserved. Use of this source code is governed by a BSD-style license that
31481 +// hand only do so within the body of existing method and function
32487 +// reserved. Use of this source code is governed by a BSD-style license that
32493 +// hand only do so within the body of existing method and function
32766 +// reserved. Use of this source code is governed by a BSD-style license that
32772 +// hand only do so within the body of existing method and function
33117 +// reserved. Use of this source code is governed by a BSD-style license that
33123 +// hand only do so within the body of existing method and function
33249 +// reserved. Use of this source code is governed by a BSD-style license that
33255 +// hand only do so within the body of existing method and function
33299 +// reserved. Use of this source code is governed by a BSD-style license that
33305 +// hand only do so within the body of existing method and function
33433 +// reserved. Use of this source code is governed by a BSD-style license that
33439 +// hand only do so within the body of existing method and function
33483 +// reserved. Use of this source code is governed by a BSD-style license that
33489 +// hand only do so within the body of existing method and function
33550 +// reserved. Use of this source code is governed by a BSD-style license that
33556 +// hand only do so within the body of existing method and function
33597 +// reserved. Use of this source code is governed by a BSD-style license that
33603 +// hand only do so within the body of existing method and function
33742 +// reserved. Use of this source code is governed by a BSD-style license that
33748 +// hand only do so within the body of existing method and function
33793 +// reserved. Use of this source code is governed by a BSD-style license that
33799 +// hand only do so within the body of existing method and function
33864 +// reserved. Use of this source code is governed by a BSD-style license that
33870 +// hand only do so within the body of existing method and function
34196 +// reserved. Use of this source code is governed by a BSD-style license that
34202 +// hand only do so within the body of existing method and function
34310 +// reserved. Use of this source code is governed by a BSD-style license that
34316 +// hand only do so within the body of existing method and function
34839 +// reserved. Use of this source code is governed by a BSD-style license that
34845 +// hand only do so within the body of existing method and function
34918 +// reserved. Use of this source code is governed by a BSD-style license that
34924 +// hand only do so within the body of existing method and function
35077 +// reserved. Use of this source code is governed by a BSD-style license that
35083 +// hand only do so within the body of existing method and function
35147 +// reserved. Use of this source code is governed by a BSD-style license that
35153 +// hand only do so within the body of existing method and function
35196 +// reserved. Use of this source code is governed by a BSD-style license that
35202 +// hand only do so within the body of existing method and function
35340 +// reserved. Use of this source code is governed by a BSD-style license that
35346 +// hand only do so within the body of existing method and function
35644 # List of includes_win_capi from cef_paths2.gypi.
35646 # List of includes_linux_capi from cef_paths2.gypi.
35698 # find the native side functions.
35730 + * Verify WebShare fails if share of file name '/' is called from a user gesture.
35738 + // Click (instead of directly calling the JavaScript function) to simulate a user gesture.
35791 …<message name="IDS_ENTERPRISE_SIGNIN_TITLE" desc="The title of the dialog to confirm linking the b…
35804 … on Windows, Linux or Fuchsia when permission is requested to inform users of how to focus the per…
35813 …<message name="IDS_CERT_SELECTOR_SUBJECT_COLUMN" desc="The text of the header for the certificate …
35816 …-8362,7 +8362,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
35840 …<message name="IDS_DESKTOP_MEDIA_PICKER_SOURCE_TYPE_THIS_TAB" desc="Text for one of the dialog-tab…
35858 …<message name="IDS_WEBAUTHN_GENERIC_TITLE" desc="Title of most dialogs shown while the user is aut…
35867 …<message name="IDS_CABLEV2_MAKE_CREDENTIAL_NOTIFICATION_TITLE" desc="The title of a notification s…
35880 …<message name="IDS_ENTERPRISE_SIGNIN_TITLE" desc="The title of the dialog to confirm linking the b…
35892 + <message name="IDS_SETTINGS_RESET_TO_DEFAULT_THEME" desc="Name of the control which resets the…
35896 …<message name="IDS_SETTINGS_CHROME_COLORS" desc="Text of the label describing 'Chrome Colors' them…
35900 …GS_MANAGE_CERTIFICATES_DESCRIPTION" desc="Secondary, continued explanation of how to manage SSL ce…
36568 // of lacros-chrome is complete.
36922 - auto it = store_map_.find(origin);
37038 // Stores the list of orrigins which have a managed configuration(may not yet
37155 -// Class responsible for internal storage of the managed configuration. Adding
37158 +// Class responsible for internal storage of the managed configuration.
37473 // Note that the list of file types that are not allowed to open
37556 // A danger level of ALLOW_ON_USER_GESTURE is used to label potentially
37557 // dangerous file types that have a high frequency of legitimate use. We would
37646 for (const std::string& entry : data_.text)
37647 content_size += entry.size();
37671 auto it = std::find(data_.paths.begin(), data_.paths.end(), path);
37790 // Set to true once the scan of text has completed. If the scan request has
38253 // The number of user gestures we trace back for the referrer chain.
38262 base::StringPrintf("Could not find tab with id %d.", params->tab_id)));
38619 + // of a tab dragging session.
38698 + // The new window isn't supposed to be focused. Here, instead of showing an
38701 + // We still use ShowInactive() (instead of doing a Show() followed
38702 + // immediately by Deactivate()) because the process of showing the window is
38854 + // The old browser (which retains focus) should be on top of the new browser.
38896 // The number of user gestures to trace back for the referrer chain.
39005 // the |disable_reasons| (a bitmask of disable_reason::DisableReason - there
39115 // of lacros-chrome is complete.
39532 // Key & 0x1f corresponds to the value of the key when either the control or
39691 // data indicates that quiet UI should be used. This creates a control group of
40284 * be applied to a search highlight span (which is inserted dynamically if
40290 -<span inner-h-t-m-l="[[getLabel_(extensionId, extensionName)]]"></span>
40291 +<span>[[getLabel_(extensionName)]]</span>
40644 if (!entry)
40934 // There's no dialog version of this available outside views, run callback as if
41142 // of lacros-chrome is complete.
41361 +// Use of this source code is governed by a BSD-style license that can be
41413 +// Use of this source code is governed by a BSD-style license that can be
42002 // These are located at the end of the list of member variables to ensure the
42194 // There are two types of theme update. a) The observed theme change. e.g.
42304 // Exposed for testing purposes. Register the set of
42705 // On Chrome OS, like Android, we prevent sharing of Android applications.
42809 - CreateSharedFile("MyFile.txt", "text/plain", "Contents of the file"));
42811 + "text/plain", "Contents of the file"));
42929 // of lacros-chrome is complete.
42932 // Returns the channel-specific filename of the desktop shortcut used to launch
42942 // of lacros-chrome is complete.
43017 DIR_COMPONENT_UPDATED_WIDEVINE_CDM, // Base directory of the Widevine CDM
43081 // of lacros-chrome is complete.
43090 // of lacros-chrome is complete.
43143 // place of Chrome notifications. Will be replaced by kAllowSystemNotifications.
43152 // of lacros-chrome is complete.
43161 // of lacros-chrome is complete.
43231 // of lacros-chrome is complete.
43271 // of lacros-chrome is complete.
43360 + * Copyright 2022 The Chromium Authors. All rights reserved. Use of this
43376 +// Use of this source code is governed by a BSD-style license that can be
43423 +// Use of this source code is governed by a BSD-style license that can be
43575 …<message name="IDS_AUTOFILL_PROMO_CODE_OFFERS_REMINDER_TITLE" desc="Title of the bubble shown on t…
43754 // The process ID of the Crashpad handler.
43842 // Gets the socket and process ID of the Crashpad handler connected to this
43861 // to be a ucontext_t* instead of a void*. Using a reinterpret cast to convert
43908 // |golden_path| in the "History/" subdirectory of test data.
43939 - // Data for kPageUrl2 was deleted, but the index entry remains,
44039 - // Data for kPageUrl2 was deleted, but the index entry remains,
44132 // The user has explicitly opened a new tab via an entry point from inside of
44249 // Continuing here would just find the same results, potentially causing
44309 // A flag controlling the behavior of the |ConvertFlagsToSwitches| function -
44375 EXPECT_EQ(kUrl0, urls[0].url); // [0] because of url_rank.
44391 + // Previously, this was part of a monolithic Recovery3 test that aimed to
44421 - // Data for kUrl1 was deleted, but the index entry remains, this will
44458 EXPECT_EQ(kUrl0, urls[0].url); // [0] because of url_rank.
44459 - EXPECT_EQ(kUrl2, urls[1].url); // [1] because of url_rank.
44460 + EXPECT_EQ(kUrl1, urls[1].url); // [1] because of url_rank.
44461 + EXPECT_EQ(kUrl2, urls[2].url); // [2] because of url_rank.
44505 EXPECT_EQ(kUrl0, urls[0].url); // [0] because of url_rank.
44540 - // Data for kUrl1 was deleted, but the index entry remains, this will
44569 + EXPECT_EQ(kUrl0, urls[0].url); // [0] because of url_rank.
44570 + EXPECT_EQ(kUrl1, urls[1].url); // [1] because of url_rank.
44571 + EXPECT_EQ(kUrl2, urls[2].url); // [2] because of url_rank.
44947 // Set the configuration of OSCrypt.
44997 // Checks the safe browsing reputation of the webpage when the
45088 - // applied to malware sites tagged as "landing sites" (see "Types of
45093 + // "landing sites" (see "Types of Malware sites" under
45155 + const auto it1 = dangerous_patterns_.find(url);
45562 // Use of this source code is governed by a BSD-style license that can be
45767 // Keeps track of user activation state at creation time for after write
45783 + // Our version of `IsShellIntegratedExtension()` is more stringent than
45831 // subset of invalid extensions in the event the renderer is compromised.
45852 + // - For the sake of consistency across platforms, we sanitize '.lnk' and
46204 +// Use of this source code is governed by a BSD-style license that can be
46250 + DLOG(ERROR) << "MediaResource is not of Type URL";
46378 + // Send via |client_extension_| instead of |renderer_client_|, so
46410 +// Use of this source code is governed by a BSD-style license that can be
46506 + // Current duration of the media.
46536 +// Use of this source code is governed by a BSD-style license that can be
46632 +// Use of this source code is governed by a BSD-style license that can be
46820 // Request a one-time snapshot of the accessibility tree without changing
47027 + // The caller of MaybeTimeoutRequest must increase reference count of |this|
47039 +// Use of this source code is governed by a BSD-style license that can be
47072 + // Get the single instance of this class.
47319 - // unresponsiveness might be a result of the renderer sitting on a breakpoint.
47322 + // the unresponsiveness might be a result of the renderer sitting on a
47362 void UpdateTitleForEntry(NavigationEntry* entry,
47537 // Sent by the renderer process to request the creation of a new portal.
47559 // Build a single string which consists of all the arguments separated
47754 + * creating two ends of a message channel.
47776 // Saves the given title to the navigation entry and does associated work. It
47778 // titles for file URLs that have none. Thus |entry| must have a URL set.
47825 // of lacros-chrome is complete.
47849 // of lacros-chrome is complete.
47905 // |codes| represents the set of keys to lock. If |codes| has no value, then
48037 +// Use of this source code is governed by a BSD-style license that can be
48233 +// Use of this source code is governed by a BSD-style license that can be
48353 +// Use of this source code is governed by a BSD-style license that can be
48414 +// Use of this source code is governed by a BSD-style license that can be
48499 +// Use of this source code is governed by a BSD-style license that can be
48593 +// Use of this source code is governed by a BSD-style license that can be
48631 \ No newline at end of file
48701 // Create an instance of the CPU class to parse /proc/cpuinfo and cache
48853 // On Android, keeping a message loop of default type.
48916 // to methods of content::WebContentsObserver with the same names.
49018 DLOG(ERROR) << "Importing semaphore handle of unexpected type:"
49410 +// Use of this source code is governed by a BSD-style license that can be
49440 +// Implementation of AudioManager.
49466 +// Implementation of AudioManagerBase.
49513 +// Use of this source code is governed by a BSD-style license that can be
49533 + // Implementation of AudioManager.
49539 + // Implementation of AudioManagerBase.
49572 +// Use of this source code is governed by a BSD-style license that can be
49792 +// Use of this source code is governed by a BSD-style license that can be
49913 // * audio memory limit: 1MB (30 seconds of 256Kbps content).
49914 // * video memory limit: 15MB (30 seconds of 4Mbps content).
49991 +# Use of this source code is governed by a BSD-style license that can be
50028 \ No newline at end of file
50036 +// Use of this source code is governed by a BSD-style license that can be
50403 +// Use of this source code is governed by a BSD-style license that can be
50523 +// Use of this source code is governed by a BSD-style license that can be
50624 +// Use of this source code is governed by a BSD-style license that can be
50677 +// Use of this source code is governed by a BSD-style license that can be
50731 +// Use of this source code is governed by a BSD-style license that can be
50806 // Get the name of the Renderer for `renderer_type`. The returned name could be
50850 for (const auto& entry : devices_config_) {
50862 # Enable usage of OpenH264 within the media library. Used for software based
50863 # encoding of H264 content.
51064 // Extension of the mojo::RendererClient communication layer for HLS and Android
51075 // Extension of the mojo::Renderer communication layer for HLS and Android
51085 // Extension of the mojo::RendererClient communication layer for media flinging,
51138 - // Maps from the id of a response to the MessageReceiver that handles the
51249 auto it = async_responders_.find(request_id);
51276 auto it = async_responders_.find(request_id);
51714 +// Use of this source code is governed by a BSD-style license that can be
51746 +// The maximum number of AIA fetches that TryVerifyWithAIAFetching() will
51800 + << ", Total number of server certificate: " << server_cert_sum;
51824 + LOG(ERROR) << "Total number of server certificate is error";
51838 + << "\nTotal number of server certificate: " << server_cert_sum
51854 + // Create X509_LOOKUP, the store_ctx member of this data structure is
51877 +// Starting at certs[start], this function searches |certs| for an issuer of
51878 +// certs[start], then for an issuer of that issuer, and so on until it finds a
51879 +// certificate |cert| for which |certs| does not contain an issuer of
51914 + if (used_in_path.find(last_issuer) != used_in_path.end()) {
52006 + // Convert the certificates into ParsedCertificates for ease of pulling out
52040 + // TODO(estark): Instead of giving up at this point, it would be more robust
52054 + LOG(ERROR) << "TryVerifyWithAIAFetching: Reach the maximum count of AIA fetche cert";
52073 + // The last round of AIA fetches (if there were any) didn't expand the
52090 +// of its result), i.e. if |verify_result| was set. Otherwise returns false.
52149 + // roots. Walk from the end of the chain (root) to leaf, to optimize for
52225 +// Use of this source code is governed by a BSD-style license that can be
52879 // Credentials of a peer process connected to the socket.
52896 +# You may obtain a copy of the License at
53208 \ No newline at end of file
53219 + * You may obtain a copy of the License at
53319 + * @param url String: the URL of the resource to load This value cannot be
53338 + * Gets whether this NWeb has a back or forward history item for number of
53341 + * @param numSteps int: the negative or positive number of steps to move the
53347 + * Goes back in the history of this NWeb.
53352 + * Goes forward in the history of this NWeb.
53357 + * Goes to the history item that is the number of steps away from the current item.
53442 + * @param color int: the color of the background
53450 + * @param scale float: the initla scale of the page.
53467 + * @param client NWebHandler: an implementation of NWebHandler This value
53493 + * Gets the height of the HTML content.
53495 + * @return the height of the HTML content.
53500 + * Gets the current scale of this NWeb.
53508 + * from name to value. Note that if this map contains any of the headers that
53513 + * @param url String: the URL of the resource to load This value cannot be
53526 + * history entry.
53532 + * @param mimeType String: the MIME type of the data, e.g. 'text/html'. This
53534 + * @param encoding String: the encoding of the data This value may be null.
53535 + * @param historyUrl String: the URL to use as the history entry. If null
53550 + * @param mimeType String: the MIME type of the data, e.g. 'text/html'. This
53552 + * @param encoding String: the encoding of the data This value may be null.
53587 + * Set the NWebFindCallback that will receive find event.
53590 + * @param findListener NWebFindCallback : find callback
53596 + * Finds all instances of find on the page and highlights them,
53599 + * @param searchStr String: target string to find.
53613 + * @param forward bool: find back or forward:
53624 + * to the URL of the current page.
53632 + * creating two ends of a message channel.
53663 + * set the callback of the message port.
53692 + * set the locale name of current system setting..
53694 + * @param locale the locale name of current system setting.
53711 + * You may obtain a copy of the License at
53745 + * Get the origin of the web page which is trying to access the resource.
53747 + * @return the origin of the web page which is trying to access the resource.
53762 + * @param resourceId id of the resource agreed to be accessed by origin. It
53776 \ No newline at end of file
53787 + * You may obtain a copy of the License at
53873 \ No newline at end of file
53884 + * You may obtain a copy of the License at
54026 \ No newline at end of file
54034 +// Use of this source code is governed by a BSD-style license that can be
54069 + * You may obtain a copy of the License at
54110 + * @brief Get whether the instance allows setting cookies of third parties
54112 + * @return true if the instance allows the setting of third-party cookies.
54116 + * @brief Set whether the instance allows setting cookies of third parties.
54117 + * By default, this value is set to true. Nweb allows the setting of third-party cookies.
54119 + * @param accept whether the instance allows the setting of third-party cookies.
54153 + * @param value the cookie as a string, using the format of the 'Set-Cookie' HTTP response hea…
54163 + * @param value the cookie as a string, using the format of the 'Set-Cookie' HTTP response hea…
54210 \ No newline at end of file
54221 + * You may obtain a copy of the License at
54330 + * @brief obtains all origins of a specified permission type.
54347 +// Use of this source code is governed by a BSD-style license that can be
54372 \ No newline at end of file
54383 + * You may obtain a copy of the License at
54413 + * @param mimetype The mimetype of the content reported by the server.
54425 \ No newline at end of file
54436 + * You may obtain a copy of the License at
54474 + * You may obtain a copy of the License at
54509 + * You may obtain a copy of the License at
54555 \ No newline at end of file
54566 + * You may obtain a copy of the License at
54594 + * @param activeMatchOrdinal int: the zero-based ordinal of the currently
54597 + * @param isDoneCounting bool: whether the find operation has actually
54619 + * You may obtain a copy of the License at
54659 + * You may obtain a copy of the License at
54708 + * You may obtain a copy of the License at
54761 + * @brief Describes how to interpret the alpha value of a pixel.
54787 + // Out of memory
54836 + * @param url The url of the web site.
54874 + * @param url The url of the resource.
54879 + * @brief Notify the SDK of the changed document title.
54886 + * @brief Notify the SDK the current progress of loading a web site.
54899 + * @brief Obtains a list of all visited history items, used for link coloring
54908 + * @brief Notify the host application of a resource request and allow the
54941 + * @brief Notify the SDK of a new favicon for the current web site.
54944 + * @param width The width of the icon in pixel.
54945 + * @param height The height of the icon in pixel.
54947 + * @param alpha_type The alpha value of any pixel.
54956 + * @brief Notify the SDK of the url for a touch icon.
54967 + * @param message Details of the console message.
54975 + * @param origin String: the origin of the resource to get geolocation
54986 + * @param url String: The url of the page requesting the dialog.
54987 + * @param message String: The message of the dialog.
55002 + * @param url String: The url of the page requesting.
55003 + * @param message String: The message of the dialog.
55018 + * @param url String: The url of the page requesting the dialog.
55019 + * @param message String: The message of the dialog.
55020 + * @param defaultValue String: The default value of the input message.
55036 + * @param url String: The url of the page requesting the dialog.
55037 + * @param message String: The message of the dialog.
55072 + * @param reason the detail reason why render process exit, the implementation of this callba…
55088 + * @param params the params of file selector.
55197 + * You may obtain a copy of the License at
55295 + * You may obtain a copy of the License at
55328 \ No newline at end of file
55336 +// Use of this source code is governed by a BSD-style license that can be
55367 \ No newline at end of file
55375 +// Use of this source code is governed by a BSD-style license that can be
55404 \ No newline at end of file
55415 + * You may obtain a copy of the License at
55448 \ No newline at end of file
55459 + * You may obtain a copy of the License at
55509 + * You may obtain a copy of the License at
55541 + * path of AppData are still accessible. The default is false.
55582 + * Put the size of default fixed font. The default is 13.
55590 + * Put the size of default font. The default is 16.
55648 + * Put the lower limit of the minimum font size. The default is 8.
55656 + * Put the lower limit of the minimum logical font size. The default is 8.
55701 + * Put the zoom percentage of the page text. The default is 100.
55703 + * @param textZoom the zoom percentage of the page text
55712 + * NWebHandler#OnGeolocationShow callback to receive notifications of
55736 + * attempts to set a value of false will be failed.
55782 + * path of AppData are always accessible.
55828 + * Get the size of default fixed font.
55835 + * Get the size of default font.
55850 + * An instance of WebView could use a different User-Agent that
55907 + * Get the lower limit of the minimum font size.
55914 + * Get the lower limit of the minimum logical font size.
55956 + * Get the zoom percentage of the page text.
56036 + * You may obtain a copy of the License at
56084 \ No newline at end of file
56095 + * You may obtain a copy of the License at
56124 + * @return The description of the error.
56138 \ No newline at end of file
56149 + * You may obtain a copy of the License at
56212 + * @brief Gets whether the request was a result of a server-side redirect.
56221 \ No newline at end of file
56232 + * You may obtain a copy of the License at
56272 + * mapping of header name -> header value.
56473 + * You may obtain a copy of the License at
56560 + * You may obtain a copy of the License at
56589 \ No newline at end of file
56600 + * You may obtain a copy of the License at
56671 + * You may obtain a copy of the License at
56714 + * You may obtain a copy of the License at
56745 + * You may obtain a copy of the License at
56804 + * You may obtain a copy of the License at
56851 + * You may obtain a copy of the License at
56978 + * You may obtain a copy of the License at
57057 + * You may obtain a copy of the License at
57136 + KMenuCommandIdMap.find(id);
57157 + kCmMediaTypeMap.find(static_cast<int32_t>(value));
57349 \ No newline at end of file
57360 + * You may obtain a copy of the License at
57447 \ No newline at end of file
57458 + * You may obtain a copy of the License at
57498 + * You may obtain a copy of the License at
57543 + * You may obtain a copy of the License at
57993 \ No newline at end of file
58004 + * You may obtain a copy of the License at
58060 \ No newline at end of file
58071 + * You may obtain a copy of the License at
58230 + * You may obtain a copy of the License at
58299 + * You may obtain a copy of the License at
58328 \ No newline at end of file
58339 + * You may obtain a copy of the License at
58373 \ No newline at end of file
58384 + * You may obtain a copy of the License at
59364 + * You may obtain a copy of the License at
59559 + * You may obtain a copy of the License at
59585 + * You may obtain a copy of the License at
59631 \ No newline at end of file
59642 + * You may obtain a copy of the License at
59678 \ No newline at end of file
59689 + * You may obtain a copy of the License at
59851 + * You may obtain a copy of the License at
59907 + * You may obtain a copy of the License at
59974 \ No newline at end of file
59985 + * You may obtain a copy of the License at
60046 \ No newline at end of file
60057 + * You may obtain a copy of the License at
60176 + // Safeguard in case of errors to prevent reporting -1 to the API listeners.
60188 + // 1-based ordinals. Still we can receive 0 ordinal in case of no results.
60206 + * You may obtain a copy of the License at
60228 +// Handles the ohos find-in-page API requests.
60233 + // Called when receiving a new find-in-page update.
60234 + // This will be triggered when the results of FindAllSync, FindAllAsync and
60266 + // Used to check the validity of FindNext operations.
60269 + // Required by FindNext and the incremental find replies.
60288 + * You may obtain a copy of the License at
60322 + * You may obtain a copy of the License at
60363 + * You may obtain a copy of the License at
60396 \ No newline at end of file
60407 + * You may obtain a copy of the License at
60450 + * You may obtain a copy of the License at
60825 + // Add to the list of existing browsers.
60843 + // documentation in the CEF header for a detailed destription of this
60864 + // Remove from the list of existing browsers.
61280 + error_desc = "process out of memory";
62014 + * You may obtain a copy of the License at
62397 + // List of existing browser windows. Only accessed on the CEF UI thread.
62453 + * You may obtain a copy of the License at
62731 + auto itKeyValue = keyValueConverter.find(keyValue);
62744 + auto item = itConverter.find(input);
62756 + auto item = itConverter.find(input);
62819 + * You may obtain a copy of the License at
62873 \ No newline at end of file
62884 + * You may obtain a copy of the License at
62936 \ No newline at end of file
62947 + * You may obtain a copy of the License at
62978 \ No newline at end of file
62989 + * You may obtain a copy of the License at
63027 \ No newline at end of file
63038 + * You may obtain a copy of the License at
63071 \ No newline at end of file
63082 + * You may obtain a copy of the License at
63120 \ No newline at end of file
63131 + * You may obtain a copy of the License at
63163 \ No newline at end of file
63174 + * You may obtain a copy of the License at
63203 \ No newline at end of file
63214 + * You may obtain a copy of the License at
63245 \ No newline at end of file
63256 + * You may obtain a copy of the License at
63293 \ No newline at end of file
63304 + * You may obtain a copy of the License at
63342 \ No newline at end of file
63353 + * You may obtain a copy of the License at
63502 + (UserAgent().find("Windows NT") >= 0) &&
63503 + (UserAgent().find("Win64") >= 0 || UserAgent().find("WOW64") >= 0);
63892 + * You may obtain a copy of the License at
64053 + * You may obtain a copy of the License at
64415 + * You may obtain a copy of the License at
64540 + * You may obtain a copy of the License at
64623 + // Copy the next block of data into the buffer.
64723 + * You may obtain a copy of the License at
64794 + * You may obtain a copy of the License at
64849 \ No newline at end of file
64860 + * You may obtain a copy of the License at
64893 \ No newline at end of file
64904 + * You may obtain a copy of the License at
65151 + * You may obtain a copy of the License at
65203 + * You may obtain a copy of the License at
65252 \ No newline at end of file
65263 + * You may obtain a copy of the License at
65413 \ No newline at end of file
65424 + * You may obtain a copy of the License at
65479 \ No newline at end of file
65490 + * You may obtain a copy of the License at
65620 + * You may obtain a copy of the License at
65688 + * You may obtain a copy of the License at
65738 + * You may obtain a copy of the License at
65777 + * You may obtain a copy of the License at
65942 + * You may obtain a copy of the License at
66001 + * You may obtain a copy of the License at
66041 + // For maximum count of nweb instance
66089 + auto it = map->find(nweb_id);
66199 + WVLOG_E("fail to create nweb delegate of web engine");
66261 + auto it = std::find(web_engine_args_.begin(), web_engine_args_.end(), arg);
66770 + auto it = map->find(nweb_id);
66783 + * You may obtain a copy of the License at
66946 + * You may obtain a copy of the License at
67093 + * You may obtain a copy of the License at
67157 + * You may obtain a copy of the License at
67518 + * You may obtain a copy of the License at
67707 + * You may obtain a copy of the License at
67736 + unsigned int bf_size; /* Size of file */
67744 + unsigned int bi_size; /* Size of info header */
67745 + int bi_width; /* Width of image */
67746 + int bi_height; /* Height of image */
67747 + unsigned short bi_planes = 1; /* Number of color planes */
67748 + unsigned short bi_bit_count = 24; /* Number of bits per pixel */
67749 + unsigned int bi_compression = 0; /* Type of compression to use */
67750 + unsigned int bi_size_image = 0; /* Size of image data */
67753 + unsigned int bi_colors_used = 0; /* Number of colors used */
67754 + unsigned int bi_colors_important = 0; /* Number of important colors */
68031 + * You may obtain a copy of the License at
68135 + * You may obtain a copy of the License at
68176 \ No newline at end of file
68186 +# You may obtain a copy of the License at
68211 + * You may obtain a copy of the License at
68243 \ No newline at end of file
68254 + * You may obtain a copy of the License at
68316 + * You may obtain a copy of the License at
68360 \ No newline at end of file
68371 + * You may obtain a copy of the License at
68419 + * You may obtain a copy of the License at
68515 + * You may obtain a copy of the License at
68565 + * You may obtain a copy of the License at
68643 \ No newline at end of file
68654 + * You may obtain a copy of the License at
68727 + * You may obtain a copy of the License at
68932 # SSBD (Speculative Store Bypass Disable) is a mitigation of Spectre Variant 4.
69098 // type of zygote will apply their own custom sandboxes later.
69149 +// Use of this source code is governed by a BSD-style license that can be
69325 +// Use of this source code is governed by a BSD-style license that can be
69528 +// Use of this source code is governed by a BSD-style license that can be
69661 +// Use of this source code is governed by a BSD-style license that can be
69768 // Provides information on the dump state of resident pages. These values are
69851 # Template for things that are logically part of :skia, but need to be split out
69883 +// Use of this source code is governed by a BSD-style license that can be
69898 \ No newline at end of file
69931 - // This has the side effect of setting SQLITE_RecoveryMode, which
69932 + // The PRAGMA below has the side effect of setting SQLITE_RecoveryMode, which
69933 // allows SQLite to process through certain cases of corruption.
69983 + // multiple records, each of which has multiple lines.
70026 - // Run "PRAGMA integrity_check" and post each line of
70027 - // results into |messages|. Returns the success of running the
70036 + // If the method returns true, `messages` is populated with a list of
70040 + // and the PRAGMA returns "ok" in case of success.
70258 + // Populate the table with powers of two. These numbers make it easy to see if
70266 + // SQLite to use the table instead of the index.
70312 - // Insert a bit of data.
70315 + // Populate the table with powers of two. These numbers make it easy to see if
70336 - // Delete a row from the table, while leaving the index entry which
70376 + // SUM(unindexed) heavily nudges SQLite to use the table instead of the index.
70426 - // Insert a bit of data.
70429 + // Populate the table with powers of two. These numbers make it easy to see if
70464 - // Delete a row from the index while leaving a table entry.
70469 + // Zero out the last page of the database. This should be the overflow page
70498 - // A full table scan shows all of the original data. Using column [v] to
70499 - // force use of the table rather than the index.
70543 + // SUM(unindexed) heavily nudges SQLite to use the table instead of the index.
70556 - // Only one of the values is retained.
70598 + // Populate the table with powers of two. These numbers make it easy to see if
70712 +// Read a database's page size. Returns nullopt in case of error.
70729 + // Currently, the page_size field value of 1 is a special case for 64kb pages.
70749 +// Read the number of the root page of a B-tree (index/table).
71006 // Collection of test-only convenience functions.
71022 -// Common implementation of CorruptSizeInHeader() which operates on loaded
71032 -// Frequently corruption is a result of failure to atomically update
71035 -// helper restores the prior version of a b-tree root after running an
71044 +// Simulates total index corruption by zeroing the root page of an index B-tree.
71059 // Return the number of tables in sqlite_schema.
71311 # Disabled by default on MSVC because of compiler warnings/errors.
71326 # Support using glslang to generate SPIR-V for the time being for the purpose of debugging
71568 // Representation of the Web App Manifest scope if any.
71583 // chrome, except for the cases where it would require lots of extra work for
71621 // Original url of the subframe (i.e. based the parent's html sources).
71624 // the document of this frame doesn't have the HTMLLinkElement.
71627 + // This passes a url of a img down to the renderer, in order to get img cache of
71646 // of this API is the same as DispatchEvent just that there is no callback
71653 // Representation of the Web App Manifest scope if any.
71734 // to/from the orientation of the video.
71978 + // document base URL of document's browsing context's container
72142 // Cache the preferred size of the page in order to prevent sending the IPC
72714 + // if InnerNode is not the image , find image from fallback.
73030 \ No newline at end of file
73284 + // recorded, it could have been outside of the painting cull rect thus
73646 // pthread_create() (e.g., the main thread of blink_unittests).
73787 + // about:blank's document.baseURI reports the parent's URL instead of its
73797 + "Check the baseURL of an about:blank document same-origin with its parent",
73801 + "Check the baseURL of an about:blank document cross-origin with its parent",
73805 + "Check the baseURL of an about:blank document cross-site with its parent",
73816 +FAIL Check the baseURL of an about:blank document same-origin with its parent assert_equals: expec…
73817 +FAIL Check the baseURL of an about:blank document cross-origin with its parent assert_equals: expe…
73818 +FAIL Check the baseURL of an about:blank document cross-site with its parent assert_equals: expect…
73909 // In the case of Android the log can be written to the default system log
73910 // (default behavior of write() above, or to the crash log (see
74050 // .note.crashpad.info section. That note in turn contains the address of
74120 " the address of a SanitizationInformation struct.\n"
74156 // instance of crashpad_handler to be writing metrics at a time, and it should
74382 //! \brief The `main()` entry point for Android libraries.
74384 //! This symbol is the entry point for crashpad when it is dynamically loaded
74436 DCHECK(name.value().find('/') == std::string::npos);
74758 # all of Chromium's OSes so we explicitly make the target visible only on
74933 WebP is an image format that does both lossy and lossless compression of
74934 digital photographic images. WebP consists of a codec based on VP8, that Google
75297 -// argument values. However, you can force a copy of a string argument value with TRACE_STR_COPY:
75303 +// a copy of a string argument value with TRACE_STR_COPY:
75317 // The TRACE_EVENT[0-2] macros trace the duration of entire scopes:
75346 #error "Another copy of this file has already been included."
75469 -// Records a pair of begin and end events called "name" for the current scope, with 0, 1 or 2
75471 +// Records a pair of begin and end events called "name" for the current scope,
75512 // Records the value of a counter called "name" immediately. Value
75523 // Records the values of a multi-parted counter called "name" immediately.
75563 +// Records a pair of begin and end events called "name" for the current scope,
75597 +// Records the value of a counter called "name" immediately. Value
75604 +// Records the values of a multi-parted counter called "name" immediately.
75605 +// The UI will treat value1 and value2 as parts of a whole, displaying their
75640 +// Macros to track the life time and value of arbitrary client objects.
75675 -// Records a pair of begin and end events called "name" for the current scope, with 0, 1 or 2
75677 +// Records a pair of begin and end events called "name" for the current scope,
75750 // Macros to track the life time and value of arbitrary client objects.
75781 -// Enum reflecting the scope of an INSTANT event. Must fit within TRACE_EVENT_FLAG_SCOPE_MASK.
75782 +// Enum reflecting the scope of an INSTANT event. Must fit within
75794 +// Use of this source code is governed by a BSD-style license that can be
75815 + * \param fname the full name of system font configuration document.
75831 + * \return The reference of fallbackForMap
75839 + * \return The reference of fallbackSet
75846 +/*! To get the count of font style sets supported in the system
75847 + * \return The count of font style sets in generic family
75854 +/*! To get the family name of the default font style set
75855 + * \param[out] familyName a pointer of SkString object, to which the family value will be set.
75856 + * \return The count of typeface in this font style set
75864 +/*! To get the family name of a font style set
75865 + * \param index the index of a font style set in generic family
75866 + * \param[out] familyName a pointer of SkString object, to which the family value will be set
75867 + * \return The count of typeface in the font style set
75868 + * \n Return -1, if the 'index' is out of range
75884 +/*! To get the count of a font style set
75885 + * \param styleIndex the index of a font style set
75889 + * \return The count of typeface in the font style set
75909 + * \param styleIndex the index of a font style set
75910 + * \param index the index of a typeface in its style set
75913 + * \return The pointer of a typeface
75914 + * \n Return null, if 'styleIndex' or 'index' is out of range
75943 + * \return An object of typeface whose font style is the closest matching to 'style'
75944 + * \n Return null, if 'styleIndex' is out of range
75967 +/*! To get the index of a font style set
75968 + * \param familyName the family name of the font style set
75969 + * \n get the index of default font style set, if 'familyName' is null
75973 + * \return The index of the font style set
75983 + int* p = genericNames.find(fname);
75988 + p = fallbackNames.find(fname);
76001 + * \n Return null, if the count of typeface is 0
76028 + * \return The difference value of a specified style with the matching style
76041 + // When dstWidth and srcWidth are at different side of kNormal_Width,
76070 + // so we set the difference of kNormal_Weight and kMedium_Weight is 50 in order to differ from…
76074 + // side of kNormal_Weight, the weight difference between them should be more than 500 (1000/2)
76097 +/*! To get the data of font configuration file
76098 + * \param fname the full name of the font configuration file
76099 + * \param[out] size the size of data returned to the caller
76100 + * \return The pointer of content of the file
76124 + * \param fname the full name of the font configuration document
76128 + * \return ERROR_CONFIG_INVALID_VALUE_TYPE wrong type of value in the configuration
76185 + * \param fname the full name of the font configuration document
76231 +/*! To print out the information of generic font style set
76254 +/*! To print out the information of fallback font style set
76281 + * \param root the root node of 'fontdir'
76300 +/*! To parse an item of 'generic' family
76301 + * \param root the root node of an item in 'generic' list
76304 + * \return ERROR_CONFIG_MISSING_TAG missing tag of 'family' or 'alias'
76371 +/*! To parse an item of 'alias' attribute
76372 + * \param root the root node of an item in an 'alias' list
76373 + * \param[out] aliasSet the value of AliasInfo will be written to and returned to the caller
76376 + * \return ERROR_CONFIG_MISSING_TAG missing tag of alias name
76408 +/*! To parse an item of 'adjust' attribute
76409 + * \param root the root node of an item in an 'adjust' list
76410 + * \param[out] adjustSet the value of AdjustInfo will be written to and returned to the caller
76413 + * \return ERROR_CONFIG_MISSING_TAG missing tag of 'weight' or 'to'
76435 +/*! To parse an item of 'fallback' attribute
76436 + * \param root the root node of an item in 'fallback' list
76439 + * \return ERROR_CONFIG_MISSING_TAG missing tag of fallbackFor
76470 +/*! To parse an item of fallback family
76471 + * \param root the root node of a fallback item
76474 + * \return ERROR_CONFIG_MISSING_TAG missing tag of language
76543 +/*! To parse an item of 'variations' attribute
76544 + * \param root the root node of an item in 'variations' list
76545 + * \param[out] variationSet the value of VariationInfo is written to and returned to the caller
76548 + * \return ERROR_CONFIG_MISSING_TAG missing tag of 'weight' or 'wght'
76601 + * \param root the root node of 'index' attribute
76602 + * \param familyName the name of the family which the root node belongs to
76608 + unsigned int keyCount = 2; // the value of 'index' is an array with 2 items.
76611 + if (item.ttcIndex != 0 && ttcIndexMap.find(item.familyName) == nullptr) {
76636 + * \param axisDefs the axis ranges of a font
76660 + * \param count the count of typeface in a ttc font
76661 + * \param font an object of the FontInfo with font information
76687 + * \param axisDefs the axis ranges of a variable font
76688 + * \param font an object of the FontInfo with font information
76695 + if (variationMap.find(key) == nullptr || axisDefs.count() == 0) {
76703 + const std::vector<VariationInfo>& variationSet = *(variationMap.find(key));
76722 +/*! To get the typeface set of a font style set
76723 + * \param familyName the family name of a font style set
76724 + * \param[out] specifiedName the specified family name of a font style set returned to the caller
76725 + * \return The object of typeface set
76731 + if (aliasMap.find(familyName) != nullptr) {
76732 + const std::vector<AliasInfo>& aliasSet = *(aliasMap.find(familyName));
76738 + } else if (fallbackNames.find(familyName) != nullptr) {
76739 + int index = *(fallbackNames.find(familyName));
76747 + * \param fname the full name of a font file
76775 + if (adjustMap.find(font.familyName) != nullptr) {
76776 + const std::vector<AdjustInfo> adjustSet = *(adjustMap.find(font.familyName));
76886 + * \param familyName the family name of the sub typeface set
76887 + * \param weight the weight of the sub typeface set
76923 + * \param err the id of an error
76925 + * \return false, this kind of error did not happen
76938 +/*! To get the total count of errors happened
76939 + * \return The count of errors
76965 +/*! To get the display text of an error
76966 + * \param err the id of an error
76979 + return "the format of config file is not supported";
77013 + * \param err the id of an error
77015 + * \param expected the expected type of json node.
77017 + * \param actual the actual type of json node.
77056 +// Use of this source code is governed by a BSD-style license that can be
77113 + ERROR_CONFIG_FORMAT_NOT_SUPPORTED, // the formation of configuration is not supported
77127 + * \brief To manage the related information of a 'fallbackFor' family name
77130 + unsigned int index; // the index of the first font style set in the fallback set for a specifi…
77131 + unsigned int count; // the count of font style sets for a specified family name
77138 + SkString familyName; // the specified family name of the font style set
77139 + std::shared_ptr<TypefaceSet> typefaceSet; // the typeface set of the font style set
77195 + int origValue; // the real value of the font weight
77196 + int newValue; // the specified value of weight for a font
77200 + * \brief To manage the alias information of
77203 + int pos; // the index of a font style set in generic family list.
77204 + int weight; // the weight of the font style set. 0 means no specified weight
77213 + int weight; // the value of mapping weight
77214 + int width; // the value of mapping width
77215 + int slant; // the value of mapping slant
77222 + SkString familyName; // the family name of the first typeface in a ttc font
77223 + int ttcIndex; // the index of a typeface in a ttc font
77227 + * \brief To manage the information of errors happened
77239 + GenericFamilySet genericFamilySet; // the font style set list of generic family
77240 + FallbackSet fallbackSet; // the font style set list of fallback family
77242 + NamesMap genericNames; // a map to store the index of a family for generic family
77243 + NamesMap fallbackNames; // a map to store the index of a family for fallback family
77292 +// Use of this source code is governed by a BSD-style license that can be
77318 + * \param font an object of FontInfo
77332 + * \param font an object of FontInfo
77346 + * \param fname the fullname of font file
77347 + * \param index the index of the typeface in the font file
77365 + * \param font an object of FontInfo
77386 + * \param font an object of FontInfo
77407 + * \param count the count of axis
77408 + * \param axis an array of SkFixed value
77409 + * \param range an array of AxisDefinition
77422 + SkString familyName; // the real family name of the font
77423 + SkString fname; // the full name of font file
77424 + int index; // the index of the font in a ttc font
77434 + std::unique_ptr<SkStreamAsset> stream; // the data stream of font file
77445 +// Use of this source code is governed by a BSD-style license that can be
77455 + * \param path the full path of system font configuration document
77463 +/*! To get the count of families
77464 + * \return The count of families in the system
77472 + * \param index the index of a font style set
77474 + * \n The family name will be reset to "", if index is out of range
77484 +/*! To create an object of SkFontStyleSet
77485 + * \param index the index of a font style set
77486 + * \return The pointer of SkFontStyleSet
77487 + * \n Return null, if index is out of range
77501 +/*! To get a matched object of SkFontStyleSet
77502 + * \param familyName the family name of a font style set
77503 + * \return The pointer of SkFontStyleSet
77527 + * \param familyName the family name of a font style set
77529 + * \return An object of typeface which is closest matching to 'style'
77548 + * \n Use the system fallback to find a typeface for the given character.
77551 + * \param bcp47 an array of languages which indicate the language of 'character'
77552 + * \param bcp47Count the array size of bcp47
77554 + * \return An object of typeface which is for the given character
77571 + item = fallbackForMap.find(defaultFamily);
77573 + item = fallbackForMap.find(SkString(familyName));
77577 + item = fallbackForMap.find(defaultFamily);
77595 + item = fallbackForMap.find(defaultFamily);
77608 + item = fallbackForMap.find(defaultFamily);
77615 +/*! To find the matched typeface for the given parameters
77616 + * \n Use the system fallback to find a typeface for the given character.
77617 + * \param fallbackItem the fallback items in which to find the typeface
77619 + * \param bcp47 an array of languages which indicate the language of 'character'
77620 + * \param bcp47Count the array size of bcp47
77622 + * \return An object of typeface which is for the given character
77641 + // find the families matching the bcp47 list
77674 +/*! To compare the languages of an typeface with a bcp47 list
77676 + * \param bcp47 the array of bcp47 language to be matching
77677 + * \param bcp47Count the array size of bcp47
77678 + * \param tps an array of the index of typeface which is matching one value of bcp47
77679 + * \return The index of language in bcp47, if matching happens
77695 + if (langs.find(bcp47[i]) != -1) {
77705 + if (langs.find(iso15924) != -1 ||
77706 + (strncmp(bcp47[i], "und", strlen("und")) && langs.find(country.c_str()) != -1)) {
77717 + * \return The object of typeface which is closest matching to the given 'style'
77718 + * \n Return null, if the family name of the given typeface is not found in the system
77733 + * \param index the index of typeface. 0 for none
77734 + * \return The object of typeface, if successful
77751 + * \param index the index of typeface. 0 for none
77752 + * \return The object of typeface, if successful
77769 + * \param args the arguments of font
77770 + * \return The object of typeface, if successful
77784 + * \param path the full path of the given font file
77785 + * \param ttcIndex the index of typeface in a ttc font file. 0 means none.
77786 + * \return The object of typeface, if successful
77787 + * \n Return null if the font file is not found or the content of file is not recognized.
77809 + * \return The object of typeface which is the closest matching 'style' when the familyName is fou…
77831 + * \param args the arguments of index or axis values
77832 + * \param path the fullname of font file
77833 + * \return The object of typeface if successful
77874 + * \return The object of typeface, if successful
77908 + * \param fname the full name of system font configuration documents
77909 + * \return The object of SkFontMgr_OHOS
77924 + * Use of this source code is governed by a BSD-style license that can be
77972 + std::shared_ptr<FontConfig_OHOS> fontConfig = nullptr; // the pointer of FontConfig_OHOS
77974 + int familyCount = 0; // the count of font style sets in generic family list
77995 +// Use of this source code is governed by a BSD-style license that can be
78001 + * \param fontConfig the pointer of FontConfig_OHOS
78002 + * \param index the index of the font style set
78015 +/*! To get the count of typeface
78016 + * \return The count of typeface in this font style set
78024 + * \param the index of a typeface
78056 + // the value of font weight is between 0 ~ 1000 (refer to SkFontStyle::Weight)
78068 + * \param index the index of the typeface in this font style set
78069 + * \return The object of a typeface, if successful
78070 + * \n Return null, if the 'index' is out of range
78086 + * \return the object of a typeface which is the closest matching to 'pattern'
78104 +// Use of this source code is governed by a BSD-style license that can be
78128 + std::shared_ptr<FontConfig_OHOS> fontConfig_ = nullptr; // the object of FontConfig_OHOS
78129 + int styleIndex = 0; // the index of the font style set
78130 + bool isFallback = false; // the flag of font style set. False for fallback family, true for ge…
78142 +// Use of this source code is governed by a BSD-style license that can be
78172 +/*! To get stream of the typeface
78173 + * \param[out] ttcIndex the index of the typeface in a ttc file returned to the caller
78174 + * \return The stream object of the typeface
78193 + * \return The object of SkFontData
78211 +/*! To get the font descriptor of the typeface
78228 +/*! To get the family name of the typeface
78247 + * \return The object of a new typeface
78273 +/*! To get the font information of the typeface
78274 + * \return The object of FontInfo
78287 +// Use of this source code is governed by a BSD-style license that can be
78300 + * \brief The implementation of SkTypeface for ohos platform
78316 + std::unique_ptr<FontInfo> fontInfo; // the font information of this typeface
78471 + --no-entry \
78498 +# Explanation of the emcc build flags follows. Full docs for these can
78515 +# containing a list of emscripten-supplied APIs, one per line, which
78519 +# list of C functions, one per line, which must be exported via wasm
78542 +# --no-entry: for compiling library code with no main(). If this is
78543 +# not supplied and the code has a main(), it is called as part of the
78544 +# module init process. Note that main() is #if'd out of shell.c
78560 +# minification makes little difference in terms of overall
78694 and most of the documentation are managed separately.
78698 then you are looking at a mirror. The names of check-ins and
78704 in the root of the tree. Always use the official name, not the
78747 used to generate much of the SQLite API documentation. The Tcl scripts
78752 the src/parse.y file. The conversion of "parse.y" into "parse.c" is done
78764 @@ -237,7 +237,7 @@ prepared statements, the description of
78766 the [overview of the query planner](http://www.sqlite.org/optoverview.html).
78768 -Years of effort have gone into optimizating SQLite, both
78769 +Years of effort have gone into optimizing SQLite, both
78771 complex code. So there is a lot of complexity in the current SQLite
78790 The `manifest` file at the root directory of the source tree
78794 -The SHA3-256 hash of the `manifest`
78795 -file itself is the official name of the version of the source tree that you
78796 -have. The `manifest.uuid` file should contain the SHA3-256 hash of the
78797 +The name of the version of the entire source tree is just the
78798 +SHA3-256 hash of the `manifest` file itself, possibly with the
78799 +last line of that file omitted if the last line begins with
78801 +The `manifest.uuid` file should contain the SHA3-256 hash of the
78802 `manifest` file. If all of the above hash comparisons are correct, then
78819 // Use of this source code is governed by a BSD-style license that can be
79488 -** Out-of-memory simulator variables
79491 -static unsigned int oomRepeat = 0; /* Number of OOMs in a row */
79496 ** This is the name of our program. It is set in main(), used
79497 ** in a number of other places, mostly for error messages.
79520 +** out-of-memory error.
79585 ** Return the value of a hexadecimal digit. Return -1 if the input
79642 +** The author disclaims copyright to this source code. In place of
79646 +** May you find forgiveness for yourself and forgive others.
79652 +** mechanism to add a tracing layer on top of SQLite. If this extension
79659 +** This extension is used to implement the --memtrace option of the
79753 ** The sha3(X) function computes the SHA3 hash of the input X, or NULL if
79756 -** The sha3_query(Y) function evalutes all queries in the SQL statements of Y
79757 +** The sha3_query(Y) function evaluates all queries in the SQL statements of Y
79758 ** and returns a hash of their results.
79779 ** The author disclaims copyright to this source code. In place of
79790 -** If neither of the optional arguments is present, then this UDF
79792 -** of bytes written is returned. If an error occurs, NULL is returned.
79797 -** field by the stat() system call). Three types of files may
79805 -** interpreted as text and used as the target of the link. For a
79807 -** named file. Regardless of the type of file, its permissions are
79811 -** as an integer - the number of seconds since the unix epoch. The
79812 -** modification-time of the target file is set to this value before
79820 -** Read and return the contents of file FILE (type blob) from disk.
79837 +** of digits compare in numeric order.
79840 -** mode: Value of stat.st_mode for directory entry (an integer).
79841 -** mtime: Value of stat.st_mtime for directory entry (an integer).
79843 -** symlink, a text value containing the text of the link. For a
79846 +** they do not mess of the maginitude comparison of embedded
79847 +** strings of digits. "x00123y" is equal to "x123y".
79851 -** And the paths returned in the "name" column of the table are also
79860 -** DLL form of this extension for WIN32. See its use below for details.
79861 +** * Embedded integers can be of arbitrary length. Comparison
79901 -** Structure of the fsdir() table-valued function
79902 +** Compare text in lexicographic order, except strings of digits
79907 -#define FSDIR_COLUMN_NAME 0 /* Name of the file */
79911 -#define FSDIR_COLUMN_PATH 4 /* Path to top of search */
79917 -** contents of file zName. Or, leave the result unchanged (NULL)
79924 -** off of disk.
80002 -** Implementation of the "readfile(X)" SQL function. The entire content
80003 -** of the file named X is read and returned as a BLOB. NULL is returned
80020 -** Set the error message contained in context ctx to the results of
80047 -** number of seconds since the Unix Epoch (1970-01-01 00:00:00 UTC).
80050 +** The author disclaims copyright to this source code. In place of
80054 +** May you find forgiveness for yourself and forgive others.
80118 + int nDigit; /* Total number of digits */
80119 + int nFrac; /* Number of digits to the right of the decimal point */
80120 + signed char *a; /* Array of digits. Most significant first. */
80155 -** This function is used in place of stat(). On Windows, special handling
80179 -** This function is used in place of lstat(). On Windows, special handling
80199 -** Argument zFile is the name of a file that will be created and/or written
80273 -** header comments at the top of this file for details.
80458 -** Implementation of the "writefile(W,X[,Y[,Z]]])" SQL function.
80459 -** Refer to header comments at the top of this file for details.
80474 - "wrong number of arguments to function writefile()", -1
80553 -** text string in the style of "ls -l".
80600 - char *zDir; /* Name of directory (nul-terminated) */
80606 - int nLvl; /* Number of entries in aLvl[] array */
80607 - int iLvl; /* Index of current entry */
80608 - FsdirLevel *aLvl; /* Hierarchy of directories being traversed */
80614 - char *zPath; /* Path to current entry */
80714 +** digits to the right of the decimal point.
80792 -** pCur to the results of vprintf(zFmt, ...).
80803 -** Advance an fsdir_cursor to its next row of output.
80872 -** Return values of columns for the row at which the series_cursor
80982 -** row a value 1 more than that of the previous.
81011 -** Return TRUE if the cursor has been moved off of the last
81012 -** row of output.
81026 +** Return the sum or difference of X and Y.
81163 -** The query plan is represented by values of idxNum:
81164 +** Return the product of X and Y.
81170 +** the number of digits after the decimal point is no less than
81171 +** either the number of digits in either input.
81182 - int idxPath = -1; /* Index in pIdxInfo->aConstraint of PATH= */
81183 - int idxDir = -1; /* Index in pIdxInfo->aConstraint of DIR= */
81297 - fsdirEof, /* xEof - check for end of scan */
81391 ** The author disclaims copyright to this source code. In place of
81394 ** May you find forgiveness for yourself and forgive others.
81403 +** and input of IEEE754 Binary64 floating-point numbers.
81413 +** The function will return a string of the form 'ieee754(Y,Z)' where
81416 -** The two query parameters are optional. $prefix is the text of the
81420 +** base-2 exponent of a new floating point number. The function returns
81429 -** This virtual table operates at the speed of human typing, and so there
81456 +** can be used to compute the exact decimal representation of binary64
81457 +** values. To begin, first compute a table of exponent values:
81471 +** Then, to compute the exact decimal representation of a floating
81499 -/* completion_vtab is a subclass of sqlite3_vtab which will
81500 -** serve as the underlying representation of a completion virtual table
81508 -/* completion_cursor is a subclass of sqlite3_vtab_cursor which will
81509 -** serve as the underlying representation of a cursor that scans
81510 -** over rows of the result
81516 - int nPrefix, nLine; /* Number of bytes in zPrefix and zLine */
81520 - int szRow; /* Length of the zCurrentRow string */
81551 -** Think of this routine as the constructor for completion_vtab objects.
81558 -** result set of queries against completion will look like.
81559 +** Implementation of the ieee754() function
81581 -#define COMPLETION_COLUMN_CANDIDATE 0 /* Suggested completion of the input */
81582 -#define COMPLETION_COLUMN_PREFIX 1 /* Prefix of the word to be completed */
81645 -** Advance a completion_cursor to its next row of output.
81647 -** The ->ePhase, ->j, and ->pStmt fields of the completion_cursor object
81648 -** record the current state of the scan. This routine sets ->zCurrentRow
81649 -** to the current row of output and then returns. If no more rows remain,
81651 -** table that has reached the end of its scan.
81655 -** take zLine into account to try to restrict the set of identifiers and
81656 -** keywords based on what would be legal at the current point of input.
81792 - /* Extract the next row of content */
81802 + /* Limit the range of e. Ticket 22dea1cfdb9151e4 2021-03-02 */
81859 -** Return values of columns for the row at which the completion_cursor
81905 -** Return TRUE if the cursor has been moved off of the last
81906 -** row of output.
81915 -** to the first row of output. This method is always called at least
81979 -** function: "prefix" and "wholeline". Bit 0 of idxNum is set if "prefix"
81992 - int prefixIdx = -1; /* Index of the start= constraint, or -1 if none */
81993 - int wholelineIdx = -1; /* Index of the stop= constraint, or -1 if none */
81994 - int nArg = 0; /* Number of arguments that completeFilter() expects */
82055 - completionEof, /* xEof - check for end of scan */
82129 ** The author disclaims copyright to this source code. In place of
82132 ** May you find forgiveness for yourself and forgive others.
82139 -** appended onto the end of some other file, such as an executable.
82145 -** A special record must appear at the end of the file that identifies the
82147 -** of the exposed content. (Or, it is the length of the content prefix.)
82157 +** of 5.
82164 +** Integers from 0 through 100 with a step size of 1.
82170 -** (4) If none of the above apply and the SQLITE_OPEN_CREATE flag is
82177 -** To avoid unnecessary complications with the PENDING_BYTE, the size of
82197 +** words, the following pairs of queries are equivalent to each other:
82216 +** to bound the sequence of generated values. If the equality constraints
82220 +** encourages the query planner to order joins such that the bounds of the
82229 -/* The append mark at the end of the database is:
82233 +/* series_cursor is a subclass of sqlite3_vtab_cursor which will
82234 +** serve as the underlying representation of a cursor that scans
82235 +** over rows of the result
82254 +** Think of this routine as the constructor for series_vtab objects.
82257 -** the offset to page 1, and also the length of the prefix content.
82263 +** result set of queries against generate_series will look like.
82301 -** Maximum size of the combined prefix + database + append-mark. This
82312 -** Try to align the database to an even multiple of APND_ROUNDUP bytes.
82331 -** Forward declaration of objects used by this utility
82349 -** An instance of this structure describes the appended database file.
82355 -** The structure of an AppendVFS database is like this:
82370 -** the offset from the start of prefix-file to the start
82371 -** of "database".
82373 -** The size of the database is iMark - iPgOne.
82376 -** of iPgOne stored as a big-ending 64-bit integer.
82378 -** iMark will be the size of the underlying file minus 25 (APND_MARKSIZE).
82381 +** Advance a series_cursor to its next row of output.
82385 - sqlite3_int64 iPgOne; /* Offset to the start of the database */
82386 - sqlite3_int64 iMark; /* Offset of the append mark. -1 if unwritten */
82402 +** Return values of columns for the row at which the series_cursor
82444 +** row a value 1 more than that of the previous.
82517 +** Return TRUE if the cursor has been moved off of the last
82518 +** row of output.
82534 +/* True to cause run-time checking of the start=, stop=, and/or step=
82553 -** Add the append-mark onto what should become the end of the file.
82555 -* Parameter iWriteEnd is the appendvfs-relative offset of the new mark.
82557 +** to the first row of output. This method is always called at least
82574 +** is pointing at the first row, or pointing off the end of the table
82646 + /* If any of the constraints have a NULL value, then return no rows.
82699 + int unusableMask = 0; /* Mask of unusable constraints */
82700 + int nArg = 0; /* Number of arguments that seriesFilter() expects */
82717 -** Return the current file-size of an apnd-file.
82762 + ** are unusable constraints on any of start, stop, or step then
82780 + /* If either boundary is missing, we have to generate a huge span
82781 + ** of numbers. Make this case very expensive so that the query
82809 + seriesEof, /* xEof - check for end of scan */
82879 +** The author disclaims copyright to this source code. In place of
82883 +** May you find forgiveness for yourself and forgive others.
82901 +** X* zero or more occurrences of X
82902 +** X+ one or more occurrences of X
82903 +** X? zero or one occurrences of X
82904 +** X{p,q} between p and q occurrences of X
82907 +** ^X X occurring at the beginning of the string
82908 +** X$ X occurring at the end of the string
82910 +** \c Character c where c is one of \{}()[]|*+?.
82927 +** performance is bounded by O(N*M) where N is the size of the regular
82928 +** expression and M is the size of the input string. The matcher never
82930 +** to p copies of X following by q-p copies of X? and that the size of the
82945 +** The following #defines change the names of some functions implemented in
82946 +** this file to prevent name collisions with C-library functions of the
82968 +/* The end-of-input character */
82969 +#define RE_EOF 0 /* End of input */
82976 +/* The NFA is implemented as sequence of opcodes taken from the following
82981 +#define RE_OP_ANYSTAR 3 /* Special optimized version of .* */
82985 +#define RE_OP_CC_INC 7 /* Beginning of a [...] character class */
82986 +#define RE_OP_CC_EXC 8 /* Beginning of a [^...] character class */
82988 +#define RE_OP_CC_RANGE 10 /* Range of values in a character class */
83010 +** once. An instance of the following object records all active states in
83012 +** number of actives states is small.
83015 + unsigned nState; /* Number of current states */
83028 +/* A compiled NFA (or an NFA that is in the process of being compiled) is
83029 +** an instance of the following object.
83039 + int nInit; /* Number of characters in zInit */
83040 + unsigned nState; /* Number of entries in aOp[] and aArg[] */
83051 -/* Fetch a page of a memory-mapped file */
83062 +** *pzIn to the first byte past the end of the character returned. To
83111 -** Try to read the append-mark off the end of a file. Return the
83112 -** start of the appended database if the append-mark is present.
83115 -** An append-mark is only valid if the NNNNNNNN start-of-database offset
83117 -** start-of-database value must be a multiple of 512.
83340 +/* Append a new opcode and argument to the end of the RE under construction.
83346 +/* Make a copy of N opcodes starting at iStart onto the end of the RE
83417 +/* Peek at the next byte of input */
83422 +/* Compile RE text into a sequence of opcodes. Continue up to the
83444 +/* Compile an element of regular expression text (anything that can be
83651 + return "out of memory";
83660 + return "out of memory";
83749 +** Implementation of the regexp() SQL function. This function implements
83888 + ** of regexp(PATTERN,STRING). */
83907 ** The author disclaims copyright to this source code. In place of
83910 ** May you find forgiveness for yourself and forgive others.
83916 -** mechanism to add a tracing layer on top of SQLite. If this extension
83923 -** This extension is used to implement the --memtrace option of the
84018 -** The author disclaims copyright to this source code. In place of
84024 -** May you find forgiveness for yourself and forgive others.
84029 +** If neither of the optional arguments is present, then this UDF
84031 +** of bytes written is returned. If an error occurs, NULL is returned.
84037 +** field by the stat() system call). Three types of files may
84041 -** of digits compare in numeric order.
84047 -** they do not mess of the maginitude comparison of embedded
84048 -** strings of digits. "x00123y" is equal to "x123y".
84050 +** interpreted as text and used as the target of the link. For a
84052 +** named file. Regardless of the type of file, its permissions are
84059 +** as an integer - the number of seconds since the unix epoch. The
84060 +** modification-time of the target file is set to this value before
84063 -** * Embedded integers can be of arbitrary length. Comparison
84074 -** Compare text in lexicographic order, except strings of digits
84138 -** The author disclaims copyright to this source code. In place of
84143 -** May you find forgiveness for yourself and forgive others.
84145 +** Read and return the contents of file FILE (type blob) from disk.
84165 +** mode: Value of stat.st_mode for directory entry (an integer).
84166 +** mtime: Value of stat.st_mtime for directory entry (an integer).
84168 +** symlink, a text value containing the text of the link. For a
84173 +** And the paths returned in the "name" column of the table are also
84179 +** DLL form of this extension for WIN32. See its use below for details.
84228 - int nDigit; /* Total number of digits */
84229 - int nFrac; /* Number of digits to the right of the decimal point */
84230 - signed char *a; /* Array of digits. Most significant first. */
84235 +** Structure of the fsdir() table-valued function
84242 +#define FSDIR_COLUMN_NAME 0 /* Name of the file */
84246 +#define FSDIR_COLUMN_PATH 4 /* Path to top of search */
84263 +** contents of file zName. Or, leave the result unchanged (NULL)
84270 +** off of disk.
84472 +** Implementation of the "readfile(X)" SQL function. The entire content
84473 +** of the file named X is read and returned as a BLOB. NULL is returned
84503 +** Set the error message contained in context ctx to the results of
84545 +** number of seconds since the Unix Epoch (1970-01-01 00:00:00 UTC).
84589 -** digits to the right of the decimal point.
84723 +** This function is used in place of stat(). On Windows, special handling
84762 -** Return the sum or difference of X and Y.
84763 +** This function is used in place of lstat(). On Windows, special handling
84796 +** Argument zFile is the name of a file that will be created and/or written
84857 +** header comments at the top of this file for details.
84993 +** Implementation of the "writefile(W,X[,Y[,Z]]])" SQL function.
84994 +** Refer to header comments at the top of this file for details.
85029 + "wrong number of arguments to function writefile()", -1
85064 -** Return the product of X and Y.
85069 -** the number of digits after the decimal point is no less than
85070 -** either the number of digits in either input.
85072 +** text string in the style of "ls -l".
85152 + char *zDir; /* Name of directory (nul-terminated) */
85158 + int nLvl; /* Number of entries in aLvl[] array */
85159 + int iLvl; /* Index of current entry */
85160 + FsdirLevel *aLvl; /* Hierarchy of directories being traversed */
85166 + char *zPath; /* Path to current entry */
85305 -** The author disclaims copyright to this source code. In place of
85309 -** May you find forgiveness for yourself and forgive others.
85315 -** and input of IEEE754 Binary64 floating-point numbers.
85321 -** The function will return a string of the form 'ieee754(Y,Z)' where
85325 -** base-2 exponent of a new floating point number. The function returns
85354 -** can be used to compute the exact decimal representation of binary64
85355 -** values. To begin, first compute a table of exponent values:
85369 -** Then, to compute the exact decimal representation of a floating
85389 +** pCur to the results of vprintf(zFmt, ...).
85409 -** Implementation of the ieee754() function
85410 +** Advance an fsdir_cursor to its next row of output.
85535 - /* Limit the range of e. Ticket 22dea1cfdb9151e4 2021-03-02 */
85541 +** Return values of columns for the row at which the series_cursor
85638 +** row a value 1 more than that of the previous.
85651 +** Return TRUE if the cursor has been moved off of the last
85652 +** row of output.
85733 +** The query plan is represented by values of idxNum:
85755 + int idxPath = -1; /* Index in pIdxInfo->aConstraint of PATH= */
85756 + int idxDir = -1; /* Index in pIdxInfo->aConstraint of DIR= */
85829 + fsdirEof, /* xEof - check for end of scan */
85918 ** The author disclaims copyright to this source code. In place of
85932 -** of 5.
85936 -** Integers from 0 through 100 with a step size of 1.
85958 -** words, the following pairs of queries are equivalent to each other:
85969 +** The two query parameters are optional. $prefix is the text of the
85985 +** This virtual table operates at the speed of human typing, and so there
85991 -** to bound the sequence of generated values. If the equality constraints
85995 -** encourages the query planner to order joins such that the bounds of the
86006 +/* completion_vtab is a subclass of sqlite3_vtab which will
86007 +** serve as the underlying representation of a completion virtual table
86015 -/* series_cursor is a subclass of sqlite3_vtab_cursor which will
86016 +/* completion_cursor is a subclass of sqlite3_vtab_cursor which will
86017 ** serve as the underlying representation of a cursor that scans
86018 ** over rows of the result
86027 + int nPrefix, nLine; /* Number of bytes in zPrefix and zLine */
86031 + int szRow; /* Length of the zCurrentRow string */
86063 -** Think of this routine as the constructor for series_vtab objects.
86064 +** Think of this routine as the constructor for completion_vtab objects.
86072 -** result set of queries against generate_series will look like.
86073 +** result set of queries against completion will look like.
86100 +#define COMPLETION_COLUMN_CANDIDATE 0 /* Suggested completion of the input */
86101 +#define COMPLETION_COLUMN_PREFIX 1 /* Prefix of the word to be completed */
86180 -** Advance a series_cursor to its next row of output.
86181 +** Advance a completion_cursor to its next row of output.
86183 +** The ->ePhase, ->j, and ->pStmt fields of the completion_cursor object
86184 +** record the current state of the scan. This routine sets ->zCurrentRow
86185 +** to the current row of output and then returns. If no more rows remain,
86187 +** table that has reached the end of its scan.
86191 +** take zLine into account to try to restrict the set of identifiers and
86192 +** keywords based on what would be legal at the current point of input.
86283 + /* Extract the next row of content */
86306 -** Return values of columns for the row at which the series_cursor
86307 +** Return values of columns for the row at which the completion_cursor
86348 -** row a value 1 more than that of the previous.
86360 ** Return TRUE if the cursor has been moved off of the last
86361 ** row of output.
86375 -/* True to cause run-time checking of the start=, stop=, and/or step=
86386 ** to the first row of output. This method is always called at least
86403 -** is pointing at the first row, or pointing off the end of the table
86451 - /* If any of the constraints have a NULL value, then return no rows.
86506 +** function: "prefix" and "wholeline". Bit 0 of idxNum is set if "prefix"
86519 - int unusableMask = 0; /* Mask of unusable constraints */
86520 - int nArg = 0; /* Number of arguments that seriesFilter() expects */
86522 + int prefixIdx = -1; /* Index of the start= constraint, or -1 if none */
86523 + int wholelineIdx = -1; /* Index of the stop= constraint, or -1 if none */
86524 + int nArg = 0; /* Number of arguments that completeFilter() expects */
86582 - ** are unusable constraints on any of start, stop, or step then
86603 - /* If either boundary is missing, we have to generate a huge span
86604 - ** of numbers. Make this case very expensive so that the query
86637 - seriesEof, /* xEof - check for end of scan */
86644 + completionEof, /* xEof - check for end of scan */
86694 ** The author disclaims copyright to this source code. In place of
86704 +** appended onto the end of some other file, such as an executable.
86712 +** A special record must appear at the end of the file that identifies the
86714 +** of the exposed content. (Or, it is the length of the content prefix.)
86724 -** X* zero or more occurrences of X
86725 -** X+ one or more occurrences of X
86726 -** X? zero or one occurrences of X
86727 -** X{p,q} between p and q occurrences of X
86730 -** ^X X occurring at the beginning of the string
86731 -** X$ X occurring at the end of the string
86733 -** \c Character c where c is one of \{}()[]|*+?.
86756 +** (4) If none of the above apply and the SQLITE_OPEN_CREATE flag is
86761 +** To avoid unnecessary complications with the PENDING_BYTE, the size of
86768 -** performance is bounded by O(N*M) where N is the size of the regular
86769 -** expression and M is the size of the input string. The matcher never
86771 -** to p copies of X following by q-p copies of X? and that the size of the
86786 -** The following #defines change the names of some functions implemented in
86787 -** this file to prevent name collisions with C-library functions of the
86789 +/* The append mark at the end of the database is:
86795 +** the offset to page 1, and also the length of the prefix content.
86801 -/* The end-of-input character */
86802 -#define RE_EOF 0 /* End of input */
86808 -/* The NFA is implemented as sequence of opcodes taken from the following
86811 +** Maximum size of the combined prefix + database + append-mark. This
86816 -#define RE_OP_ANYSTAR 3 /* Special optimized version of .* */
86820 -#define RE_OP_CC_INC 7 /* Beginning of a [...] character class */
86821 -#define RE_OP_CC_EXC 8 /* Beginning of a [^...] character class */
86823 -#define RE_OP_CC_RANGE 10 /* Range of values in a character class */
86836 +** Try to align the database to an even multiple of APND_ROUNDUP bytes.
86845 -** once. An instance of the following object records all active states in
86847 -** number of actives states is small.
86849 +** Forward declaration of objects used by this utility
86852 - unsigned nState; /* Number of current states */
86871 -/* A compiled NFA (or an NFA that is in the process of being compiled) is
86872 -** an instance of the following object.
86875 +** An instance of this structure describes the appended database file.
86881 +** The structure of an AppendVFS database is like this:
86896 +** the offset from the start of prefix-file to the start
86897 +** of "database".
86899 +** The size of the database is iMark - iPgOne.
86902 +** of iPgOne stored as a big-ending 64-bit integer.
86904 +** iMark will be the size of the underlying file minus 25 (APND_MARKSIZE).
86915 - int nInit; /* Number of characters in zInit */
86916 - unsigned nState; /* Number of entries in aOp[] and aArg[] */
86920 + sqlite3_int64 iPgOne; /* Offset to the start of the database */
86921 + sqlite3_int64 iMark; /* Offset of the append mark. -1 if unwritten */
86954 -** *pzIn to the first byte past the end of the character returned. To
87090 +** Add the append-mark onto what should become the end of the file.
87092 +* Parameter iWriteEnd is the appendvfs-relative offset of the new mark.
87311 -/* Append a new opcode and argument to the end of the RE under construction.
87322 -/* Make a copy of N opcodes starting at iStart onto the end of the RE
87325 +** Return the current file-size of an apnd-file.
87410 -/* Peek at the next byte of input */
87421 -/* Compile RE text into a sequence of opcodes. Continue up to the
87454 -/* Compile an element of regular expression text (anything that can be
87634 +/* Fetch a page of a memory-mapped file */
87657 +** Try to read the append-mark off the end of a file. Return the
87658 +** start of the appended database if the append-mark is present.
87661 +** An append-mark is only valid if the NNNNNNNN start-of-database offset
87663 +** start-of-database value must be a multiple of 512.
87774 - return "out of memory";
87786 - return "out of memory";
87868 -** Implementation of the regexp() SQL function. This function implements
88015 - ** of regexp(PATTERN,STRING). */
88053 ZipfileEntry e; /* New entry to add to zip archive */
88182 /* Copy the entire schema of database [db] into [dbm]. */
88212 ** instance of the following structure.
88214 u8 eTraceType; /* SHELL_TRACE_* value for type of trace */
88216 u8 bSafeModePersist; /* The long-term value of bSafeMode */
88219 unsigned mEqpLines; /* Mask of veritical lines in the EQP output graph */
88220 + int inputNesting; /* Track nesting level of .read and other redirects */
88222 int cnt; /* Number of records displayed so far */
88223 int lineno; /* Line number of last line read from in */
88256 +#define MODE_Count 17 /* Output only a count of the rows of output */
88369 +** Maybe construct two lines of text that point out the position of a
88485 ** and ends on one of:
88488 int nAlloc = 0; /* Allocated size of p->aiIndent[], abYield */
88489 int iOp; /* Index of operation in p->aiIndent[] */
88530 +** z[] is a line of text that is to be displayed the .mode box or table or
88534 +** Compute characters to display on the first line of z[]. Stop at the
88536 +** from malloc()) of that first line, which caller should free sometime.
88542 + const unsigned char **pzTail, /* OUT: Tail of the input for next line */
88626 +/* Extract the value of the i-th current column for pStmt as an SQL literal
88659 ** Run a prepared statement and output the result in one of the
88856 + raw_printf(stderr, "sqlite3_expert_new: %s\n", zErr ? zErr : "out of memory");
88951 ** Text of help messages.
88957 ** There must be two or more spaces between the end of the command and the
88958 ** start of the description of what that command does.
88965 " Each command must have exactly one of the following options:",
88982 ".changes on|off Show number of rows changed by SQL",
88988 ".databases List names and files of attached databases",
89001 ".excel Display the output of next command in spreadsheet",
89011 ".fullschema ?--indent? Show schema and the content of sqlite_stat tables",
89012 ".headers on|off Turn display of headers on or off",
89019 " --skip N Skip the first N rows of input",
89023 " * If TABLE does not exist, it is created. The first row of input",
89045 " MODE is one of:",
89082 + " TABLE The name of SQL table used for \"insert\" mode",
89086 ".nullvalue STRING Use STRING in place of NULL values",
89101 " --append Use appendvfs to append database to the end of FILE",
89105 " --hexdb Load the output of \"dbtotxt\" as an in-memory db",
89139 ".restore ?DB? FILE Restore content of DB (default \"main\") from FILE",
89163 ".tables ?TABLE? List names of tables matching LIKE pattern TABLE",
89180 ** text of all commands that match. */
89188 n = (n+pgsz-1)&~(pgsz-1); /* Round n up to the next multiple of pgsz */
89191 - utf8_printf(stderr, "Out of memory!\n");
89453 + * pointer is non-zero, its referent will be set to a summary of renames
89476 + * from protected part of incoming column names. This defaults to "_"
89712 ** Then read the content of the testcase-out.txt file and compare against
89804 char *zFile = 0; /* Name of file to extra content from */
89806 int nCol; /* Number of columns in the table */
89809 int nSep; /* Number of bytes in p->colSeparator[] */
90089 + * overwrites already-set values, user was informed of this.
90200 raw_printf(stderr, "Error: mode should be one of: "
90222 ** at the end of this procedure */
90263 char *zNewFilename = 0; /* Name of the database file to open */
90264 int iName = 1; /* Index in azArg[] of the filename */
90705 +** without moving lots of code around (creating a larger/messier diff).
90737 int startline = 0; /* Line number for start of current input */
90966 +** portable enough to make real use of.
90973 +** Returns the filename of the given db name, assuming "main" if
90985 +** purposes of the fiddle build, that the file is in a transient
91057 ** This file is an amalgamation of many separate C source files from SQLite
91088 ** change the value of the error code. The error-code preserving
91107 +** of the start of that token. ^The byte offset returned by
91114 ** the time of the first error and the call to these interfaces.
91137 ** implementation of [application-defined SQL functions] are protected.
91148 +** which is native to the platform, regardless of the text encoding set
91158 -** The these routines may attempt to convert the datatype of the result.
91159 +** These routines may attempt to convert the datatype of the result.
91178 +** of sqlite3_value_dup(V) is a NULL value.
91191 +** for the N-th database on database connection D, or a NULL pointer of N is
91192 +** out of range. An N value of 0 means the main database file. An N of 1 is
91193 +** the "temp" schema. Larger values of N correspond to various ATTACH-ed
91204 +** private copy of the result prior to releasing the mutex.
91215 -** an operator that is part of a constraint term in the wHERE clause of
91216 +** an operator that is part of a constraint term in the WHERE clause of
91235 +** ^The left-hand operand of the operator is given by the corresponding
91236 +** aConstraint[].iColumn field. ^An iColumn of -1 indicates the left-hand
91245 +** by the [xFindFunction|xFindFunction method] of the virtual table
91261 +** tables, the collating sequence of constraints does not matter (for example
91305 ** The counter is incremented on the first [sqlite3_step()] call of each
91312 +** <dd>^SQLITE_STMTSTATUS_FILTER_HIT is the number of times that a join
91314 +** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of
91315 +** times that the Bloom filter returned a find, and thus the join step
91319 ** <dd>^This is the approximate number of bytes of heap memory
91337 -** method of a [virtual table].
91338 +** method of a [virtual table]. This function returns a pointer to a string
91339 +** that is the name of the appropriate collation sequence to use for text
91356 -** containing the name of the collation sequence for the corresponding
91362 +** a [COLLATE operator], then the name of the collation specified by
91365 +** of the constraint specifies an alternative collating sequence via
91368 +** name of that alternative collating sequence is returned.
91379 +** of a [virtual table] implementation. The result of calling this
91380 +** interface from outside of xBestIndex() is undefined and probably harmful.
91386 +** can meet the ordering requirements of the query planner, it may set
91392 +** sort order defined by the "nOrderBy" and "aOrderBy" fields of the
91395 +** the xBestIndex method to set the "orderByConsumed" flag, regardless of
91408 +** combination of values in the columns identified by the "aOrderBy" field
91424 +** ^For the purposes of comparing virtual table output values to see if the
91437 +** ordered correctly. The use of the "orderByConsumed" flag and the
91439 +** use of the sqlite3_vtab_distinct() interface and the "orderByConsumed"
91451 +** [xBestIndex|xBestIndex() method] of a [virtual table] implementation.
91452 +** The result of invoking this interface from any other context is
91455 +** ^(A constraint on a virtual table of the form
91461 +** the usual mode of handling IN operators, SQLite generates [bytecode]
91463 +** on the right-hand side of the IN operator.)^ Thus the virtual table
91464 +** only sees a single value from the right-hand side of the IN operator
91468 +** table to see all values on the right-hand of the IN operator all at
91478 +** of the IN operator is even possible.
91498 +** ^(All-at-once processing of the IN operator is selected if both of the
91510 +** ^If either or both of the conditions above are false, then SQLite uses
91515 +** [sqlite3_vtab_in_next()] to find all values on the right-hand side
91516 +** of the IN constraint.
91521 +** CAPI3REF: Find all elements on the right-hand side of an IN constraint.
91524 +** [xFilter|xFilter() method] of a [virtual table] implementation.
91525 +** The result of invoking these interfaces from any other context
91529 +** sqlite3_vtab_in_next(X,P) must be one of the parameters to the
91539 +** of the IN constraint using code like the following:
91555 +** on the RHS of the IN constraint. ^If there are no more values on the
91556 +** right hand side of the IN constraint, then *P is set to NULL and these
91558 +** some other value, such as SQLITE_NOMEM, in the event of a malfunction.
91561 +** next call to either of these routines or until the end of the xFilter
91574 +** of a [virtual table] implementation. The result of calling this interface
91575 +** from outside of an xBestIndex method are undefined and probably harmful.
91578 +** the [xBestIndex] method of a [virtual table] implementation, with P being
91579 +** a copy of the [sqlite3_index_info] object pointer passed into xBestIndex and
91581 +** attempts to set *V to the value of the right-hand operand of
91586 +** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th
91592 +** the right-hand operand of a constraint is a literal value in the original
91602 +** and remains valid for the duration of the xBestIndex method call.
91606 +** The "_rhs_" in the name of this routine is an abbreviation for
91758 /************** End of parse.h ***********************************************/
91762 ** Round up a number to the next larger multiple of 8. This is used
91767 +** ROUND8P() assumes that the argument is already an integer number of
91779 ** Round down to the nearest multiple of 8
91851 ** used in the journal to signify that the remainder of the journal file
91887 -#define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */
91899 +#define P4_INTARRAY (-14) /* P4 is a vector of 32-bit integers */
92164 +#define OP_Rowid 135 /* synopsis: r[P2]=PX rowid of P1 */
92268 ** the value of the largest JUMP opcode. The smaller the maximum
92271 ** together near the beginning of the list.
92276 /************** End of opcodes.h *********************************************/
92301 +/* Maximum number of symlinks that will be resolved while trying to
92309 ** The default size of a disk sector
92315 + int errByteOffset; /* Byte offset of error in SQL statement */
92382 + char *z; /* Cache of aMem[0].z for vdbeRecordCompareString() */
92383 + i64 i; /* Cache of aMem[0].u.i for vdbeRecordCompareInt() */
92385 + int n; /* Cache of aMem[0].n used by vdbeRecordCompareString() */
92386 u16 nField; /* Number of entries in apMem[] */
92391 ** TK_SELECT_COLUMN: column of the result vector */
92392 i16 iAgg; /* Which entry in pAggInfo->aCol[] or ->aFunc[] */
92393 - int iRightJoinTable; /* If EP_FromJoin, the right table of the join */
92396 + int iOfst; /* else: start of token from start of statement */
92405 -#define EP_FromJoin 0x000001 /* Originates in ON/USING clause of outer join */
92407 -#define EP_HasFunc 0x000004 /* Contains one or more functions of any kind */
92409 +#define EP_OuterON 0x000001 /* Originates in ON/USING clause of outer join */
92410 +#define EP_InnerON 0x000002 /* Originates in ON/USING of an inner join */
92412 +#define EP_HasFunc 0x000008 /* Contains one or more functions of any kind */
92461 /* Macros used to ensure that the correct members of unions are accessed
92467 - u8 sortFlags; /* Mask of KEYINFO_ORDER_* flags */
92468 - unsigned eEName :2; /* Meaning of zEName */
92474 + u8 sortFlags; /* Mask of KEYINFO_ORDER_* flags */
92475 + unsigned eEName :2; /* Meaning of zEName */
92481 + unsigned bUsingTerm:1; /* Term from the USING clause of a NestedFrom */
92489 ** If "a" is the k-th column of table "t", then IdList.a[0].idx==k.
92492 + int nId; /* Number of identifiers on the list */
92493 + u8 eU4; /* Which element of a.u4 is valid */
92495 char *zName; /* Name of the identifier */
92496 - int idx; /* Index in some Table.aCol[] of a column named zName */
92498 - int nId; /* Number of identifiers on the list */
92500 + int idx; /* Index in some Table.aCol[] of a column named zName */
92507 +** Allowed values for IdList.eType, which determines which value of the a.u4
92515 ** The SrcItem object represents a single term in the FROM clause of a query.
92516 ** The SrcList object is mostly an array of SrcItems.
92533 - Expr *pOn; /* The ON clause of a join */
92534 - IdList *pUsing; /* The USING clause of a join */
92536 + Expr *pOn; /* fg.isUsing==0 => The ON clause of a join */
92537 + IdList *pUsing; /* fg.isUsing==1 => The USING clause of a join */
92539 Bitmask colUsed; /* Bit N (1<<N) set if column N of pTab is used */
92551 + Expr *pOn; /* The ON clause of a join */
92552 + IdList *pUsing; /* The USING clause of a join */
92556 ** The following structure describes the FROM clause of a SELECT statement.
92557 ** Each table or subquery in the FROM clause is a separate element of
92560 ** Permitted values of the SrcList.a.jointype field
92562 -#define JT_INNER 0x0001 /* Any kind of inner or cross join */
92563 -#define JT_CROSS 0x0002 /* Explicit use of the CROSS keyword */
92570 +#define JT_INNER 0x01 /* Any kind of inner or cross join */
92571 +#define JT_CROSS 0x02 /* Explicit use of the CROSS keyword */
92576 +#define JT_LTORJ 0x40 /* One of the LEFT operands of a RIGHT JOIN
92581 ** Flags appropriate for the wctrlFlags parameter of sqlite3WhereBegin()
92592 #define SF_CopyCte 0x4000000 /* SELECT statement is a copy of a CTE */
92599 ** The results of a SELECT can be distributed in several ways, as defined
92600 ** by one of the following macros. The "SRT" prefix means "SELECT Result
92603 u8 disableLookaside; /* Number of times lookaside has been disabled */
92613 + TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */
92614 + ParseCleanup *pCleanup; /* List of cleanup operations to run after parse */
92616 int addrCrTab; /* Address of OP_CreateBtree on CREATE TABLE */
92627 Token sArg; /* Complete text of a module argument */
92630 - TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */
92632 - ParseCleanup *pCleanup; /* List of cleanup operations to run after parse */
92638 ** Sizes and pointers of various parts of the Parse object.
92650 - * Each trigger present in the database schema is stored as an instance of
92653 - * Pointers to instances of struct Trigger are stored in two ways.
92654 - * 1. In the "trigHash" hash table (part of the sqlite3* that represents the
92657 - * pNext member of struct Trigger. A pointer to the first element of the
92658 - * linked list is stored as the "pTrigger" member of the associated
92661 - * The "step_list" member points to the first element of a linked list
92664 +** Each trigger present in the database schema is stored as an instance of
92667 +** Pointers to instances of struct Trigger are stored in two ways.
92668 +** 1. In the "trigHash" hash table (part of the sqlite3* that represents the
92671 +** pNext member of struct Trigger. A pointer to the first element of the
92672 +** linked list is stored as the "pTrigger" member of the associated
92675 +** The "step_list" member points to the first element of a linked list
92679 char *zName; /* The name of the trigger */
92685 - * An instance of struct TriggerStep is used to store a single SQL statement
92686 - * that is a part of a trigger-program.
92688 - * Instances of struct TriggerStep are stored in a singly linked list (linked
92689 - * using the "pNext" member) referenced by the "step_list" member of the
92690 - * associated struct Trigger instance. The first element of the linked list is
92691 - * the first step of the trigger-program.
92694 - * "SELECT" statement. The meanings of the other members is determined by the
92695 - * value of "op" as follows:
92701 - * zTarget -> Dequoted name of the table to insert into.
92709 - * zTarget -> Dequoted name of the table to delete from.
92710 - * pWhere -> The WHERE clause of the DELETE statement if one is specified.
92714 - * zTarget -> Dequoted name of the table to update.
92715 - * pWhere -> The WHERE clause of the UPDATE statement if one is specified.
92717 - * pExprList -> A list of the columns to update and the expressions to update
92718 - * them to. See sqlite3Update() documentation of "pChanges"
92722 +** An instance of struct TriggerStep is used to store a single SQL statement
92723 +** that is a part of a trigger-program.
92725 +** Instances of struct TriggerStep are stored in a singly linked list (linked
92726 +** using the "pNext" member) referenced by the "step_list" member of the
92727 +** associated struct Trigger instance. The first element of the linked list is
92728 +** the first step of the trigger-program.
92731 +** "SELECT" statement. The meanings of the other members is determined by the
92732 +** value of "op" as follows:
92738 +** zTarget -> Dequoted name of the table to insert into.
92745 +** zTarget -> Dequoted name of the table to delete from.
92746 +** pWhere -> The WHERE clause of the DELETE statement if one is specified.
92750 +** zTarget -> Dequoted name of the table to update.
92751 +** pWhere -> The WHERE clause of the UPDATE statement if one is specified.
92753 +** pExprList -> A list of the columns to update and the expressions to update
92754 +** them to. See sqlite3Update() documentation of "pChanges"
92761 +** pExprList -> The list of expressions that follow the RETURNING keyword.
92765 u8 op; /* One of TK_DELETE, TK_UPDATE, TK_INSERT, TK_SELECT,
92986 /************** End of os_common.h *******************************************/
92992 +** To modify this header, edit any of the various lists in that script
92993 +** which specify categories of generated conditionals in this file.
93088 u8 eCurType; /* One of the CURTYPE_* values above */
93089 - i8 iDb; /* Index of cursor database in db->aDb[] (or -1) */
93090 + i8 iDb; /* Index of cursor database in db->aDb[] */
93098 - Bool hasBeenDuped:1; /* This cursor was source or target of OP_OpenDup */
93110 ** Vdbe.cacheCtr. Vdbe.cacheCtr will never take on the value of
93128 + int n; /* Number of characters in string value, excluding '\0' */
93129 u16 flags; /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */
93132 - int n; /* Number of characters in string value, excluding '\0' */
93137 int szMalloc; /* Size of the zMalloc allocation */
93143 Mem *pScopyFrom; /* This Mem is a shallow copy of pScopyFrom */
93145 ** Size of struct Mem not including the Mem.zMalloc member or anything that
93151 -/* One or more of the following flags are set to indicate the validOK
93152 +/* One or more of the following flags are set to indicate the
93153 ** representations of the value stored in the Mem struct.
93178 +** * MEM_Blob|MEM_Zero A blob in Mem.z of length Mem.n plus
93201 #define MEM_AffMask 0x003f /* Mask of affinity bits */
93203 +/* Extra bits that modify the meanings of the core datatypes above
93209 -#define MEM_TypeMask 0xc1bf /* Mask of type bits */
93212 +#define MEM_Zero 0x0400 /* Mem.i contains count of 0s appended to blob */
93214 +#define MEM_TypeMask 0x0dbf /* Mask of type bits */
93216 -/* Whenever Mem contains a valid string or blob representation, one of
93228 -#define MEM_Zero 0x4000 /* Mem.i contains count of 0s appended to blob */
93249 +** A Memory cell is initialized if at least one of the
93261 int iOp; /* Instruction number of OP_Function */
93265 u8 argc; /* Number of arguments */
93268 Vdbe *pPrev,*pNext; /* Linked list of VDBEs with the same Vdbe.db */
93270 ynVar nVar; /* Number of entries in aVar[] */
93271 - u32 iVdbeMagic; /* Magic number defining state of the SQL statement */
93272 int nMem; /* Number of memory locations currently allocated */
93273 int nCursor; /* Number of slots in apCsr[] */
93276 u8 errorAction; /* Recovery action to do in case of an error */
93280 + u8 eVdbeState; /* On of the VDBE_*_STATE values */
93288 yDbMask btreeMask; /* Bitmask of db->aDb[] entries referenced */
93289 yDbMask lockMask; /* Subset of btreeMask that requires a lock */
93292 char *zSql; /* Text of the SQL statement that generated this */
93294 char *zNormSql; /* Normalization of the associated SQL statement */
93319 +** An instance of this object is used to pass an vector of values into
93320 +** OP_VFilter, the xFilter method of a virtual table. The vector is the
93321 +** set of values on the right-hand side of an IN constraint.
93326 +** and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces
93328 +** right operand of the IN constraint.
93336 +/* Size of content associated with serial types that fit into a
93397 ** non-zero on any kind of error.
93404 +** invoked in place of the OS-defined localtime() function.
93407 ** library function localtime_r() is used to assist in the calculation of
93466 /* Initialize the contents of sLocal to avoid a compiler warning. */
93543 ** of several units of time.
93547 - u8 nName; /* Length of th name */
93548 - char *zName; /* Name of the transformation */
93551 + u8 nName; /* Length of the name */
93552 + char zName[7]; /* Name of the transformation */
93573 const char *z, /* The text of the modifier */
93574 int n, /* Length of zMod in bytes */
93577 + int idx /* Parameter index of the modifier */
93613 + ** value in the allowed range of julian day numbers understood by
93737 +** Return the number of seconds (including fractional seconds) since
93738 +** the unix epoch of 1970-01-01 00:00:00 GMT.
93879 ** Free any prior content in *pz and replace it with a copy of zNew.
93910 + sqlite3ErrorMsg(db->pParse, "out of memory");
93976 } /* End of function */
93980 +** The z string points to the first character of a token that is
94003 +** If pExpr has a byte offset for the start of a token, record that as
94018 ** able to accept at least N more bytes of text.
94020 ** Return the number of bytes of text that StrAccum is able to accept
94051 ** Finished with one layer of the tree
94066 ** Generate a single line of output for the tree, with a prefix that contains
94084 ** Shorthand for starting a new tree item that consists of a single label
94093 +** Show a list of Column objects in tree format.
94140 ** Generate a human-readable description of a WITH clause.
94534 +** Generate a human-readable explanation of an id-list.
94584 +** Generate a human-readable explanation of a list of Upsert objects
94614 +** Generate a human-readable diagram of the data structure that go
94670 +** Generate a human-readable diagram of the data structure that go
94740 +** Generate a human-readable diagram of the data structure that go
94818 +** Show a human-readable graph of a TriggerStep
94841 +** Show a human-readable graph of a Trigger
94869 +** These simplified versions of the tree-view routines omit unnecessary
94926 ** If it is not NULL, string zFormat specifies the format of the
94927 -** error string in the style of the printf functions: The following
94934 -** %S Insert the first element of a SrcList
94953 -** %S Insert the first element of a SrcList
94997 -** Note that this routine is only used when one or more of various
95011 - ** possible to this routine is 310, resulting in a maximum x of 31 */
95280 + /* 135 */ "Rowid" OpHelp("r[P2]=PX rowid of P1"),
95344 u16 mask; /* Mask of locks to take or release */
95394 -** If the last component of the pathname in z[0]..z[j-1] is something
95412 + int nSymlink; /* Number of symlinks resolved */
95414 + int nOut; /* Bytes of space available to zOut[] */
95415 + int nUsed; /* Bytes of zOut[] currently being used */
95425 -** Remove all instances of /./
95426 -** Remove all isntances of /X/../ for any X
95432 - int nOut /* Allocated size of buffer zOut */
95436 + int nName /* Number of significant bytes in zName */
95469 - ** of a pathname is allowed since this is important on windows. */
95501 - ** previous term of the directory if it is something other than "..".
95559 int nOut, /* Size of output buffer in bytes */
95567 - int nLink = 0; /* Number of symbolic links followed so far */
95568 - const char *zIn = zPath; /* Input path for each iteration of loop */
95661 ** Interfaces for opening a shared library, finding entry points
95669 u16 mask; /* Mask of locks to take or release */
95681 Pgno mxPgno; /* Maximum allowed size of the database */
95683 i64 pageSize; /* Number of bytes in a page */
95685 char *zFilename; /* Name of the database file */
95693 ** + 4 bytes: N (length of super-journal name in bytes, no nul-terminator).
95696 /* Write the super-journal data to the end of the journal file. If
95739 /* Copy original pages out of the journal and back into the
95795 /* In this case the pcache already contains an initialized copy of
95874 int *pnCkpt /* OUT: Final number of checkpointed frames */
95913 u8 *apOvfl[4]; /* Pointers to the body of overflow cells */
95914 BtShared *pBt; /* Pointer to BtShared that this page is part of */
95915 u8 *aData; /* Pointer to disk image of the page data */
95916 - u8 *aDataEnd; /* One byte past the end of usable data */
95917 + u8 *aDataEnd; /* One byte past the end of the entire page - not just
95931 ** These macros define the location of the pointer-map entry for a
95943 ** In this version of BtreeMoveto, pKey is a packed index record
96025 - ** past the end of the key value. */
96049 + u8 *pIter = pCell; /* For looping over bytes of pCell */
96055 + ** the (CellInfo.nSize) value found by doing a full parse of the
96056 + ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of
96073 + ** past the end of the key value. */
96106 ** The cell pCell is currently part of page pSrc but will ultimately be part
96107 -** of pPage. (pSrc and pPager are often the same.) If pCell contains a
96108 +** of pPage. (pSrc and pPage are often the same.) If pCell contains a
96109 ** pointer to an overflow page, insert an entry into the pointer-map for
96115 int iAddr = hdr + 1; /* Address of ptr to pc */
96116 - int pc = get2byte(&aData[iAddr]); /* Address of a free slot */
96118 + int pc = get2byte(pTmp); /* Address of a free slot */
96119 int x; /* Excess size of the slot */
96121 int size; /* Size of the free slot */
96123 /* EVIDENCE-OF: R-22710-53328 The third and fourth bytes of each
96124 ** freeblock form a big-endian integer which is the size of the freeblock
96139 /* This slot extends off the end of the usable part of the page */
96150 /* The next slot in the chain is not past the end of the current slot */
96152 u8 * const data = pPage->aData; /* Local cache of pPage->aData */
96153 int top; /* First byte of cell content area */
96156 int gap; /* First byte of gap between cell pointers and cell content */
96160 ** then the cell content offset of an empty page wants to be 65536.
96162 ** integer, so a value of 0 is used in its place. */
96194 /* The new freeblock is at the beginning of the cell content area,
96203 /* EVIDENCE-OF: R-07291-35328 A value of 5 (0x05) means the page is an
96238 ** number of cells on the page. */
96285 - /* One of the uses of pBt->pTmpSpace is to format cells before
96290 - ** bytes of pTmpSpace, but that the first 4 bytes are copied from
96292 - ** does cause a valgrind error when the 1 or 2 bytes of unitialized
96294 - ** zero the first 4 bytes of temp space here.
96296 - ** Also: Provide four bytes of initialized space before the
96297 - ** beginning of pTmpSpace as an area available to prepend the
96298 - ** left-child pointer to the beginning of a cell.
96318 + /* One of the uses of pBt->pTmpSpace is to format cells before
96323 + ** bytes of pTmpSpace, but that the first 4 bytes are copied from
96325 + ** does cause a valgrind error when the 1 or 2 bytes of unitialized
96327 + ** zero the first 4 bytes of temp space here.
96329 + ** Also: Provide four bytes of initialized space before the
96330 + ** beginning of pTmpSpace as an area available to prepend the
96331 + ** left-child pointer to the beginning of a cell.
96473 +** of the cell at pCur[idx] and pIdxKey.
96475 +** This routine is part of an optimization. It is always safe to return
96486 + int nCell; /* Size of the pCell cell in bytes */
96491 + /* This branch runs if the record-size field of the cell is a
96513 +** page of a table.
96525 /* Move the cursor so that it points to an entry in an index table
96533 + /* Check to see if we can skip a lot of work. Two cases:
96539 + ** (2) If the cursor is on the last page of the table and the first
96590 ** be the right kind (index or table) of b-tree page. Otherwise
96600 int nCell; /* Size of the pCell cell in bytes */
96621 int hdr; /* Beginning of the header. 0 most pages. 100 page 1 */
96663 /* Add cells to the start of the page */
96690 + ** (2) The amount of free space on the page is less than 2/3rds of
96705 BtCursor *pCur, /* Insert data into the table of this cursor */
96706 const BtreePayload *pX, /* Content of the row to be inserted */
96708 - int seekResult /* Result of prior MovetoUnpacked() call */
96709 + int seekResult /* Result of prior IndexMoveto() call */
96732 - ** blob of associated data. */
96735 /* Save the positions of any other cursors open on this table.
96762 + ** blob of associated data. */
96788 loc==0 ? "overwrite" : "new entry"));
96795 u32 nRem; /* Bytes of data still to copy */
96814 - int iCellIdx; /* Index of cell to delete */
96815 - int iCellDepth; /* Depth of node containing pCell */
96816 - CellInfo info; /* Size of the cell being deleted */
96822 + int iCellIdx; /* Index of cell to delete */
96823 + int iCellDepth; /* Depth of node containing pCell */
96824 + CellInfo info; /* Size of the cell being deleted */
96870 ** will be left in CURSOR_SKIPNEXT state pointing to the entry immediately
96871 - ** before or after the deleted entry. In this case set bSkipnext to true. */
96872 + ** before or after the deleted entry.
96888 /* A b-tree rebalance will be required after deleting this entry.
96906 + /* Optimization: If the free space is less than 2/3rds of the page,
97015 ** If the double is out of range of a 64-bit signed integer then
97041 ** is required to store the string, then value of pMem is unchanged. In
97047 +** If n is negative, then the string consists of all bytes up to but
97099 /* The following block sets the new values of Mem.z and Mem.xDel. It
97270 - /* The code generator never codes any of these opcodes as a jump
97279 - /* The code generator never codes any of these opcodes as a jump
97305 +** Check to see if a subroutine contains a jump to a location outside of
97309 +** The subroutine consists of opcodes between iFirst and iLast. Jumps to
97311 +** that contains the return address. Jumps to outside the range of iFirst
97319 +** This routine only runs during debug builds. The purpose is (of course)
97320 +** to detect invalid escapes out of a subroutine. The OP_Halt opcode
97326 + int iFirst, /* First opcode of the subroutine */
97327 + int iLast, /* Last opcode of the subroutine */
97388 ** Return the address of the next instruction to be inserted.
97433 u32 mask, /* Mask of registers to NOT release */
97497 ** Initialize an array of N Mem element.
97508 +** All other fields of Mem can safely remain uninitialized for now. They
97532 -** Release an array of N Mem elements
97533 +** Release auxiliary memory held in an array of N Mem elements.
97584 - sqlite3_int64 nByte /* Bytes of memory needed */
97585 + sqlite3_int64 nByte /* Bytes of memory needed. */
97624 ** of the prepared statement.
97626 - n = ROUND8(sizeof(Op)*p->nOp); /* Bytes of opcode memory used */
97627 + n = ROUND8P(sizeof(Op)*p->nOp); /* Bytes of opcode memory used */
97630 x.nFree = ROUNDDOWN8(pParse->szOpAlloc - n); /* Bytes of unused memory */
97742 ** To look at it another way, this routine resets the state of the
97794 ** VdbeDelete() also unlinks the Vdbe from the list of VMs associated with
97910 +** sqlite3VdbeSerialPut() <--- in-lined into OP_MakeRecord as of 2022-04-02
97945 -** Return the number of bytes written.
97947 -** nBuf is the amount of space left in buf[]. The caller is responsible
97949 -** of the pMem->u.nZero bytes for a MEM_Zero value.
97951 -** Return the number of bytes actually written into buf[]. The number
97952 -** of bytes in the zero-filled tail is included in the return value only
97991 /* Input "x" is a sequence of unsigned characters that represent a
97997 -** and store the result in pMem. Return the number of bytes read.
98002 ** routine so that in most cases the overhead of moving the stack pointer
98115 int nByte; /* Number of bytes required for *p */
98252 /* The index entry must begin with a header size */
98261 /* Fetch the integer off the end of the index record */
98306 u8 enc, /* Encoding of z. 0 for BLOBs */
98372 - ** be called automatically instead of throwing the SQLITE_MISUSE error.
98381 - ** legacy behavior of returning SQLITE_MISUSE for cases where the
98483 + ** be called automatically instead of throwing the SQLITE_MISUSE error.
98492 + ** legacy behavior of returning SQLITE_MISUSE for cases where the
98555 +** Implementation of sqlite3_vtab_in_first() (if bNext==0) and
98579 + u32 sz; /* Size of current row in bytes */
98580 + Mem sMem; /* Raw content of current row */
98620 ** is requested more than once within the same run of a single prepared
98683 int iCur, /* Index of the new VdbeCursor */
98684 int nField, /* Number of fields in the table or index */
98686 u8 eCurType /* Type of the new cursor */
98688 /* Find the memory cell that will be used to store the blob of memory
98746 ** Return the symbolic name for the data type of a pMem
98861 +** Mark the beginning of a subroutine that can be entered in-line
98872 +** the OP_Return opcode has a P3 value of 1). Thus if the subroutine is
98894 ** P4 points to a blob of data P1 bytes long. Store this
98920 ** Make a copy of registers P1..P1+P3 into registers P2..P2+P3.
98922 +** If the 0x0002 bit of P5 is set then also clear the MEM_Subtype flag in the
98923 +** destination. The 0x0001 bit of P5 indicates that this Copy opcode cannot
98927 ** This instruction makes a deep copy of the value. A duplicate
98928 ** is made of any string or blob constant. See also OP_SCopy.
98955 -** This opcode is a variant of OP_ResultRow that checks the foreign key
98960 +** to returning results such as a row change count or the result of a
98988 - /* Make sure the results of the current row are \000 terminated
99004 - ** APIs might have caused type conversions of made other changes to
99017 + ** APIs might have caused type conversions of made other changes to
99058 /* Common case of comparison of two integers */
99115 ** The first integer in the P4 integer array is the length of the array
99116 ** and does not become part of the permutation.
99181 u32 *aOffset; /* aOffset[i] is offset to start of data for i-th column */
99182 int len; /* The length of the serialized data for the column */
99217 /* For the special case of as pseudo-cursor, the seekResult field
99271 ** need to cover the header of the record. If pC->aRow does not contain
99282 /* Make sure at least the first p2+1 entries of the header have been
99336 Mem *pLast; /* Last field of the record */
99337 int nField; /* Number of fields in the record */
99340 u32 len; /* Length of a field */
99341 u8 *zHdr; /* Where to write next byte of the header */
99342 u8 *zPayload; /* Where to write next byte of the payload */
99440 ** Store the number of entries (an integer value) in the table or index
99641 + /* Key values in an array of registers */
99673 - /* For the OP_NoConflict opcode, take the jump if any of the
99710 + /* For the OP_NoConflict opcode, take the jump if any of the
99732 +** Synopsis: r[P2]=PX rowid of P1
99734 ** Store in register P2 an integer which is the key of the table entry that
99751 + /* If the cursor is not already open, create a special kind of
99776 -** P4 is always of type P4_ADVANCE. The function pointer points to
99793 -** P4 is always of type P4_ADVANCE. The function pointer points to
99878 /* End of inlined sqlite3VdbeIdxKeyCompare() */
99918 +** sqlite3_vtab_in_next() to extract all of the values stored in the P1
99986 - /* Copy the result of the function into register P3 */
100159 ** atomic-write optimization. In this case the first 28 bytes of the
100160 ** journal file may be written as part of committing the transaction. */
100224 - ** sqlite3DbFree(db, pDup) on the last line of this block, so be sure to
100225 - ** make a copy of the token before doing the sqlite3DbFree().
100305 ** Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up
100306 ** that name in the set of source tables in pSrcList and make the pExpr
100309 Schema *pSchema = 0; /* Schema of the expression */
100313 Column *pCol; /* A column of pTab */
100330 + ** parenthesized subset of the FROM clause terms. Example:
100404 - ** is for the right-hand table of a NATURAL JOIN or is in a
100553 const char *zMsg, /* Type of error */
100594 int wrong_num_args = 0; /* True if wrong number of arguments */
100596 - int nId; /* Number of characters in function name */
100661 - sqlite3ErrorMsg(pParse, "misuse of %s function %.*s()",zType,nId,zId);
100662 + sqlite3ErrorMsg(pParse, "misuse of %s function %#T()",zType,pExpr);
100668 - sqlite3ErrorMsg(pParse,"misuse of aggregate function %.*s()",nId,zId);
100669 + sqlite3ErrorMsg(pParse,"misuse of aggregate function %#T()",pExpr);
100681 - sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()",
100683 + sqlite3ErrorMsg(pParse,"wrong number of arguments to function %#T()",
100742 int i, /* The index (1-based) of the term out of range */
100743 - int mx /* Largest permissible value of i */
100744 + int mx, /* Largest permissible value of i */
100748 "%r %s BY term out of range - should be "
100807 ** order-by term to a copy of the result-set expression */
100831 /* If the number of references to the outer context changed when
100869 - sqlite3ErrorMsg(pParse, "unsafe use of %s()", pDef->zName);
100870 + sqlite3ErrorMsg(pParse, "unsafe use of %#T()", pExpr);
100895 +** Clear both elements of an OnOrUsing object
100969 - /* Note that because the size of the allocation for p->a[] is not
100970 - ** necessarily a power of two, sqlite3IdListAppend() may not be called
101012 /* If dequote==0, then pName->z does not point to part of a DDL
101025 /* If pWalker->eCode is 2 then any term of the expression that comes from
101026 - ** the ON or USING clauses of a left join disqualifies the expression
101027 + ** the ON or USING clauses of an outer join disqualifies the expression
101050 +** (3) pSrc cannot be part of the left operand for a RIGHT JOIN.
101053 +** (4) If pSrc is the right operand of a LEFT JOIN, then...
101057 +** (5) If pSrc is not the right operand of a LEFT JOIN or the left
101058 +** operand of a RIGHT JOIN, then pExpr must be from the WHERE
101078 ** all members of the RHS set, skipping duplicates.
101080 ** A cursor is opened on the b-tree object that is the RHS of the IN operator
101081 -** and pX->iTable is set to the index of that cursor.
101082 +** and the *piTab parameter is set to the index of that cursor.
101084 ** The returned value of this function indicates the b-tree type, as follows:
101087 ** If the RHS of the IN operator is a list or a more complex subquery, then
101089 ** pX->iTable made to point to the ephemeral table instead of an
101091 +** existing table. In this case, the creation and initialization of the
101092 +** ephmeral table might be put inside of a subroutine, the EP_Subrtn flag
101096 ** The inFlags parameter must contain, at a minimum, one of the bits
101100 Select *p; /* SELECT to the right of IN operator */
101101 int eType = 0; /* Type of RHS table. IN_INDEX_* */
101102 - int iTab = pParse->nTab++; /* Cursor of the RHS table */
101103 + int iTab; /* Cursor of the RHS table */
101111 /* If the RHS of this IN(...) operator is a SELECT, and if it matters
101127 + pParse->nTab--; /* Back out the allocation of the unused cursor */
101181 /* The evaluation of the EXISTS/SELECT must be repeated every time it
101182 ** is encountered if any of the following is true:
101263 ** of the first argument.
101268 - sqlite3ErrorMsg(pParse, "misuse of aggregate: %s()", pExpr->u.zToken);
101269 + sqlite3ErrorMsg(pParse, "misuse of aggregate: %#T()", pExpr);
101387 ** for clarity, but we are out of bits in the Expr.flags field so we
101417 -** Terms of p that are marked with EP_FromJoin (and hence that come from
101418 -** the ON or USING clauses of LEFT JOINS) are excluded from the analysis.
101419 +** Terms of p that are marked with EP_OuterON (and hence that come from
101420 +** the ON or USING clauses of OUTER JOINS) are excluded from the analysis.
101637 ** 1. type: Type of object ("table", "view" etc.)
101691 -** The implementation of an SQL scalar function that rewrites DDL statements
101736 ** 5: "when" part of error message.
101797 ** If D is the count of distinct values and K is the total number of
101808 sqlite3_str sStat; /* Text of the constructed "stat" line */
101863 /* Begin by generating some termination code at the end of the
101916 /* A minimum of one cursor is required if autoincrement is used
101977 int addrInsLoop; /* Top of the loop for inserting rows */
101990 Select *pSel; /* Copy of the SELECT that implements the view */
101991 int nErr = 0; /* Number of errors encountered */
101992 - int n; /* Temporarily holds the number of cursors assigned */
102047 sqlite3ErrorMsg(pParse, "unsupported use of NULLS %s",
102081 /* Add an entry in sqlite_schema for this index
102178 Token *pDatabase, /* Name of the database containing pTable */
102179 Token *pAlias, /* The right-hand side of the AS subexpression */
102180 Select *pSubquery, /* A subquery used in place of a table name */
102181 - Expr *pOn, /* The ON clause of a join */
102182 - IdList *pUsing /* The USING clause of a join */
102244 +** * All tables to the left of the right-most RIGHT JOIN are tagged with
102246 +** code generator can easily tell that the table is part of
102247 +** the left operand of at least one RIGHT JOIN.
102265 + /* All terms to the left of a RIGHT JOIN should be tagged with the
102290 +/* Generate byte-code that will report the number of rows modified
102302 ** A table is read-only if any of the following are true:
102328 ** put in an SrcList structure because some of the subroutines we
102347 ** ONEPASS_MULTI: One-pass approach - any number of rows may be deleted.
102371 +** Return the subtype of X
102383 ** Implementation of the length() function
102388 -** Implementation of the printf() function.
102389 +** Implementation of the printf() (a.k.a. format()) SQL function.
102397 -** Implementation of the QUOTE() function. This function takes a single
102402 +** Append to pStr text that is the SQL literal representation of the
102505 +** Implementation of the QUOTE() function.
102507 +** The quote(X) function returns the text of an SQL literal which is the
102508 +** value of its argument suitable for inclusion into an SQL statement.
102531 ** for the first character of the input string.
102628 +** Clear the apTrigger[] cache of CASCADE triggers for all foreign keys
102798 /* If currently processing the PRIMARY KEY of a WITHOUT ROWID
102804 ** of the matched index row are different from the original PRIMARY
102818 - return 0; /* Must be of the form INSERT INTO ... SELECT ... */
102951 + sqlite3ErrorMsg(db->pParse, "out of memory");
102963 int addrTop; /* Top of a loop checking foreign keys */
103057 + if( db->mallocFailed ) sqlite3ErrorMsg(pParse, "out of memory");
103061 +** Maximum number of times that we will try again to prepare a statement
103073 const char **pzTail /* OUT: End of parsed string */
103090 + if( db->mallocFailed ) sqlite3ErrorMsg(&sParse, "out of memory");
103093 /* For a long-term use prepared statement avoid the use of
103171 u8 eTnctType; /* One of the WHERE_DISTINCT_* operators */
103173 int addrTnct; /* Address of OP_OpenEphemeral opcode for tabTnct */
103201 +** of other non-standard and in many cases non-sensical join types.
103203 +** type and returns a result. Examples of accepted nonsense join types
103222 +** * If "OUTER" is present then there must also be one of
103228 u8 nChar; /* Length of the keyword in characters */
103302 ** of the matching column and return TRUE.
103306 SrcList *pSrc, /* Array of tables to search */
103307 - int N, /* Number of tables in pSrc->a[] to search */
103308 + int iStart, /* First member of pSrc->a[] to check */
103309 + int iEnd, /* Last member of pSrc->a[] to check */
103310 const char *zCol, /* Name of the column we are looking for */
103311 int *piTab, /* Write index of pSrc->a[] here */
103312 int *piCol, /* Write index of pSrc->a[*piTab].pTab->aCol[] here */
103317 int iCol; /* Index of column matching zCol */
103339 -** WHERE clause expression of a SELECT statement. The new term, which
103340 -** is ANDed with the existing WHERE clause, is of the form:
103345 -** (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is
103346 -** column iColRight of tab2.
103350 - SrcList *pSrc, /* List of tables in FROM clause */
103351 - int iLeft, /* Index of first table to join in pSrc */
103352 - int iColLeft, /* Index of column in first table */
103353 - int iRight, /* Index of second table in pSrc */
103354 - int iColRight, /* Index of column in second table */
103385 -** Set the EP_FromJoin property on all terms of the given expression.
103387 +** Set the EP_OuterON property on all terms of the given expression.
103391 -** The EP_FromJoin property is used on terms of an expression to tell
103392 -** the LEFT OUTER JOIN processing logic that this term is part of the
103393 +** The EP_OuterON property is used on terms of an expression to tell
103394 +** the OUTER JOIN processing logic that this term is part of the
103396 ** of the more general WHERE clause. These terms are moved over to the
103437 -/* Undo the work of sqlite3SetJoinExpr(). In the expression p, convert every
103440 +/* Undo the work of sqlite3SetJoinExpr(). This is used when a LEFT JOIN
103442 +** "pushed down" into the WHERE clause of a subquery.
103451 +** if the table that p references is on the left side of a RIGHT JOIN.
103487 -** ON and USING clauses are converted into extra terms of the WHERE clause.
103499 ** The terms of a FROM clause are contained in the Select.pSrc structure.
103500 ** The left most table is the first entry in Select.pSrc. The right-most
103501 ** table is the last entry. The join operator is held in the entry to
103502 -** the left. Thus entry 0 contains the join operator for the join between
103503 +** the right. Thus entry 1 contains the join operator for the join between
103505 -** also attached to the left entry.
103506 +** also attached to the right entry.
103508 ** This routine returns the number of errors encountered.
103540 char *zName; /* Name of column in the right table */
103568 - /* Add the ON clause to the end of the WHERE clause, connected by
103595 char *zName; /* Name of the term in the USING clause */
103597 int iLeftCol; /* Column number of matching column on the left */
103598 int iRightCol; /* Column number of matching column on the right */
103599 + Expr *pE1; /* Reference to the column on the LEFT of the join */
103600 + Expr *pE2; /* Reference to the column on the RIGHT of the join */
103620 + ** JOINs. If only a single table on the left side of this join
103623 + ** of the join, construct a coalesce() function that gathers all
103624 + ** such tables. Raise an error if more than one of those references
103628 + ** non-USING references to zName on the left of an INNER or LEFT
103629 + ** JOIN. But older versions of SQLite do not do that, so we avoid
103666 + /* Add the ON clause to the end of the WHERE clause, connected by
103792 /* Use the original text of the column expression as its name */
103833 ** The "LIMIT of exactly 1" case of condition (1) comes about when a VALUES
103846 + int nSelect; /* Number of SELECT statements in the compound */
103869 /* Allocate a range of temporary registers and the KeyInfo needed
103933 +** target slot in the parent is the right operand of a LEFT JOIN, or one of
103934 +** the left operands of a RIGHT JOIN. In either case, we need to potentially
103952 +** When the subquery on the right side of the LEFT JOIN is flattened, we
103953 +** have to add OP_IfNullRow in front of the OP_Integer that implements the
103954 +** "m" value of the subquery so that a NULL will be loaded instead of 59
103955 +** when processing a non-matched row of the left.
104013 ** just as it did when it was a column of a view or sub-query. */
104036 ** (17f) the subquery must not be the RHS of a LEFT JOIN.
104037 +** (17g) either the subquery is the first element of the outer
104039 +** of the subquery. (This is a duplicate of condition (27b).)
104047 +** (26) The subquery may not be the right operand of a RIGHT JOIN.
104051 +** is the first element of the parent query. This must be the
104055 +** in any arm of the compound query. (See also (17g).)
104059 +** (29) Either the subquery is not the right-hand operand of a join with an
104060 +** ON or USING clause nor the right-hand operand of a NATURAL JOIN, or
104061 +** the right-most table within the FROM clause of the subquery
104062 +** is not part of an outer join.
104068 SrcList *pSubSrc; /* The FROM clause of the subquery */
104069 int iParent; /* VDBE cursor number of the pSub result set temp table */
104071 - int isLeftJoin = 0; /* True if pSub is the right side of a LEFT JOIN */
104072 + int isOuterJoin = 0; /* True if pSub is the right side of a LEFT JOIN */
104119 + ** We do not want two constraints on the same term of the flattened
104121 + ** To prevent this, one or the other of the following conditions must be
104124 + ** (29a) The right-most entry in the FROM clause of the subquery
104125 + ** must not be part of an outer join.
104127 + ** (29b) The subquery itself must not be the right operand of a
104147 ** use only the UNION ALL operator. And none of the simple select queries
104164 + ** omitted on left-hand tables of the right join that is being
104194 pSubSrc = pSub->pSrc; /* FROM clause of subquery */
104195 nSubSrc = pSubSrc->nSrc; /* Number of terms in subquery FROM clause */
104250 int nChng; /* Number of times a constant is propagated */
104295 + /* Do not propagate constants through the ON clause of a LEFT JOIN */
104304 Expr *pWhere, /* The WHERE clause of the outer query */
104305 - int iCursor, /* Cursor number of the subquery */
104306 - int isLeftJoin /* True if pSubq is the right term of a LEFT JOIN */
104307 + SrcItem *pSrc /* The subquery term of the outer FROM clause */
104400 +** Check the N SrcItem objects to the right of pBase. (N might be zero!)
104401 +** If any of those SrcItem objects have a USING clause containing zName
104404 +** If N is zero, or none of the N SrcItem objects to the right of pBase
104405 +** contains a USING clause, or if none of the USING clauses contain zName,
104429 /* Process NATURAL keywords, and ON and USING clauses of joins.
104457 + ExprList *pNestedFrom; /* Result-set of a nested FROM clause */
104540 - ** table to the right of the join */
104679 SELECTTRACE(0x400,pParse,p,("After count-of-view optimization:\n"));
104687 +** If any term of pSrc, or any SF_NestedFrom sub-query, is not the same
104740 /* All of these destinations are also able to ignore the ORDER BY clause */
104805 /* Convert LEFT JOIN into JOIN if there are terms of the right table
104806 ** of the LEFT JOIN used in the WHERE clause.
104822 /* No futher action if this term of the FROM clause is no a subquery */
104886 + ** The subquery is implemented as a co-routine if all of the following are
104895 + ** (3) the subquery is not part of a left operand for a RIGHT JOIN
104905 /* Implement a co-routine that will return a single row of the result
104919 /* If the subquery is not correlated and if we are not inside of
104920 ** a trigger, then we only need to compute the value of the subquery
104946 ** original setting of the SF_Distinct flag, not the current setting */
104986 ** ORDER BY to maximize the chances of rows being delivered in an
105071 Trigger *pList; /* List of triggers to return */
105106 Token *pTableName, /* Name of the table to be updated */
105109 ExprList *pEList, /* The SET clause: list of column and new values */
105126 ** Return a list of all triggers on table pTab if there exists at least
105127 ** one trigger that must be fired when an operation of type 'op' is
105129 ** least one of the columns in pChanges is being modified.
105135 int op, /* one of TK_DELETE, TK_INSERT, TK_UPDATE */
105143 + int op, /* one of TK_DELETE, TK_INSERT, TK_UPDATE */
105145 + int *pMask /* OUT: Mask of TRIGGER_BEFORE|TRIGGER_AFTER */
105307 /* Insert an OP_Halt at the end of the sub-program. */
105359 /* Code the OP_Program opcode in the parent VDBE. P4 of the OP_Program
105386 /* If there was a FROM clause, set nChangeFrom to the number of expressions
105388 ** clause if this function is being called to generate code for part of
105502 +** This object is a header on a block of allocated memory that will be
105507 + u64 sz; /* Bytes of space */
105529 u8 iFrom; /* Which entry in the FROM clause */
105530 u8 op, p3, p5; /* Opcode, P3 & P5 of the opcode that ends the loop */
105531 int p1, p2; /* Operands of the opcode used to end the loop */
105542 + u32 mHandleIn; /* Terms to handle as IN(...) instead of == */
105559 +#define TERM_SLICE 0x8000 /* One slice of a row-value/vector comparison */
105562 ** An instance of the WhereScan object is used as an iterator for locating
105571 unsigned char nEquiv; /* Number of entries in aiCur[] and aiColumn[] */
105580 int nTerm; /* Number of terms */
105581 int nSlot; /* Number of entries in a[] */
105582 + int nBase; /* Number of terms through the last non-Virtual */
105583 WhereTerm *a; /* Each a[] describes a term of the WHERE cluase */
105608 ExprList *pResultSet; /* Result set of the query */
105615 int iBreak; /* Jump here to break out of the loop */
105617 int iEndWhere; /* End of the WHERE clause itself */
105618 WhereLoop *pLoops; /* List of all WhereLoop objects */
105621 Bitmask revMask; /* Mask of ORDER BY terms that need reversing */
105622 WhereClause sWC; /* Decomposition of the WHERE clause */
105625 u32 op, /* Mask of WO_xx values describing operator */
105672 -#define WO_ALL 0x1fff /* Mask of all possible WO_* values */
105673 +#define WO_ALL 0x3fff /* Mask of all possible WO_* values */
105674 #define WO_SINGLE 0x01ff /* Mask of all non-compound WO_* values */
105678 #define WHERE_BIGNULL_SORT 0x00080000 /* Column nEq of index is BIGNULL */
105904 ** However, if the scan currently being coded is a branch of an OR-loop and
105905 -** the statement currently being coded is a SELECT, then P3 of OP_DeferredSeek
105906 -** is set to iIdxCur and P4 is set to point to an array of integers
105907 -** containing one entry for each column of the table cursor iCur is open
105908 -** on. For each table column, if the column is the i'th column of the
105909 -** index, then the corresponding array entry is set to (i+1). If the column
105910 -** does not appear in the index at all, the array entry is set to 0.
105914 +** enable this optimization, the P3 of OP_DeferredSeek is set to iIdxCur
105915 +** and P4 is set to an array of integers containing one entry for each column
105917 +** column of the index, then the corresponding array entry is set to (i+1).
105918 +** If the column does not appear in the index at all, the array entry is set
105971 + int iLevel, /* Which level of pWInfo->a[] should be coded */
106016 ** Generate code for the start of the iLevel-th loop in the WHERE clause
106020 ** row of the left table of the join.
106038 /* Special case of a FROM clause subquery implemented as a co-routine */
106102 Expr *pRight; /* RHS of the comparison */
106103 VdbeOp *pOp; /* Opcode to access the value of the IN constraint */
106109 - ** encoding of the value in the register, so it *must* be reloaded. */
106113 + ** encoding of the value in the register, so it *must* be reloaded.
106214 ** The OR-optimization doesn't work for the right hand table of
106224 /* If the original WHERE clause is z of the form: (x1 OR x2 OR ...) AND y
106232 ** is not contained in the ON clause of a LEFT JOIN.
106235 + ** 2022-02-04: Do not push down slices of a row-value comparison.
106236 + ** In other words, "w" or "y" may not be a slice of a vector. Otherwise,
106237 + ** the initialization of the right-hand operand of the vector comparison
106267 Expr *pDelete; /* Local copy of OR clause term */
106268 int jmp1 = 0; /* Address of jump operation */
106291 + /* Set the P2 operand of the OP_Return opcode that will end the current
106292 + ** loop to point to this spot, which is the top of the next containing
106368 + /* pTab is the right-hand table of the RIGHT JOIN. Generate code that
106369 + ** will record that the current row of that table has been matched at
106400 ** at least one row of the right table has matched the left table.
106414 + ** of the RIGHT JOIN. During normal operation, the subroutine will
106415 + ** be in-line with the rest of the code. But at the end, a separate
106417 + ** of pTab, with all tables to left begin set to NULL.
106427 + ** to the results of the OUTER JOIN. The following loop generates the
106537 /************** End of wherecode.c *******************************************/
106681 - ** on left table of a LEFT JOIN. Ticket #3015 */
106699 + ** on left table of a LEFT JOIN. Ticket #3015 */
106705 + /* The ON clause of an INNER JOIN references a table to its right.
106740 ** This is only required if at least one side of the comparison operation
106803 + int iReg, /* Register that will hold value of the limit/offset */
106837 +** Possibly add terms corresponding to the LIMIT and OFFSET clauses of the
106850 +** LIMIT and OFFSET terms are ignored by most of the planner code. They
106851 +** exist only so that they may be passed to the xBestIndex method of the
106852 +** single virtual table in the FROM clause of the SELECT.
106964 +** Return a Bitmask of all tables referenced by Expr. Expr can be
106974 +** Return a Bitmask of all tables referenced by every expression
107055 + u32 mIn; /* Mask of terms that are <col> IN (...) */
107062 /* Forward declaration of methods */
107180 - Bitmask notReady /* Tables in outer loops of the join */
107183 + const Bitmask notReady /* Tables in outer loops of the join */
107193 - ** the RHS of a LEFT JOIN. Such a term can only be used if it is from
107212 ** makes use of the automatic index.
107219 - Bitmask notReady, /* Mask of cursors that are not available */
107222 + const Bitmask notReady, /* Mask of cursors that are not available */
107225 int nKeyCol; /* Number of columns in the constructed index */
107232 - || pLoop->prereq!=0 ); /* table of a LEFT JOIN */
107238 + ** WHERE clause (or the ON clause of a LEFT join) that constrain which
107239 + ** rows of the target table (pSrc) that can be used. */
107298 + int addrOnce; /* Address of opening OP_Once */
107299 + int addrTop; /* Address of OP_Rewind */
107323 + ** to zero-filled blob of at least 80K bits, but maybe more if the
107324 + ** estimated size of the table is larger. We could actually
107325 + ** measure the size of the table at run-time using OP_Count with
107389 + ** not able to do early evaluation of bloom filters that make use of
107402 ** responsibility of the caller to eventually release the structure
107413 u16 *pmNoOmit /* Mask of terms not to omit */
107434 - /* Count the number of possible WHERE clause constraints referring
107437 + ** Mark each term with the TERM_OK flag. Set nTerm to the number of
107456 + ** right-hand table of a LEFT JOIN nor to the either table of a
107499 + ** of the COLLATE operator matches the collation of the column. */
107515 + /* No matches cause a break out of the loop */
107537 sqlite3ErrorMsg(pParse, "out of memory");
107566 - ** right-hand table of a LEFT JOIN. See tag-20191211-001 for the
107652 /* Do a binary search to find the first sample greater than or equal
107653 ** to pRec. If pRec contains a single field, the set of samples to search
107766 - ** be used by the right table of a LEFT JOIN. Only constraints in the
107772 + ** be used by the right table of a LEFT JOIN nor by the left table of a
107777 + ** for an example of a WHERE clause constraints that may not be used on
107778 + ** the right table of a RIGHT JOIN because the constraint implies a
107779 + ** not-NULL condition on the left table of the RIGHT JOIN.
107802 - int isLeft, /* True if iTab is the right table of a LEFT JOIN */
107804 WhereClause *pWC, /* The WHERE clause of the query */
107833 if( !pBuilder->pOrSet /* Not part of an OR optimization */
107842 + && (pSrc->fg.jointype & JT_RIGHT)==0 /* Not the right tab of a RIGHT JOIN */
107845 LogEst rLogSize; /* Logarithm of the number of rows in the table */
107863 + /* Do not do an SCAN of a index-on-expression in a RIGHT JOIN
107942 ** consume the ORDER BY clause because (1) the order of IN terms
107943 ** is not necessarily related to the order of output terms and
107952 + ** xFilter for each value on the RHS of the IN) and a LIMIT or
107972 -** returns a pointer to a buffer containing the name of the collation
107973 -** sequence associated with element iCons of the sqlite3_index_info.aConstraint
107974 -** array. Or, if iCons is out of range or there is no active xBestIndex
108019 +** on the right-hand-side of constraint iCons.
108022 + sqlite3_index_info *pIdxInfo, /* Copy of first argument to xBestIndex */
108088 ** Add all WhereLoop objects for a table of the join identified by
108219 - ** right-hand-side of a LEFT or CROSS JOIN. */
108225 + /* Add prerequisites to prevent reordering of FROM clause terms
108227 + ** prevents the right operand of a RIGHT JOIN from being swapped with
108231 + ** prevent FROM-clause terms from moving from the right side of
108232 + ** a LEFT JOIN over to the left side of that join if the LEFT JOIN
108233 + ** is itself on the left side of a RIGHT JOIN.
108327 +** 2) The table must be the RHS of a LEFT JOIN.
108329 +** must contain a constraint that limits the scan of the table to
108331 +** 4) The table must not be referenced by any part of the query apart
108364 + ** condition (1) of the header comment */
108418 +** of rows in the table that is being considered for the Bloom
108420 +** (2) Some searches are expected to find zero rows. (This is determined
108424 +** (4) The size of the table being searched is known by ANALYZE.
108426 +** This block of code merely checks to see if a Bloom filter would be
108428 +** WhereLoop. The implementation of the Bloom filter comes further
108468 ** Generate the beginning of the loop used for WHERE clause processing.
108479 /* An ORDER/GROUP BY clause of more than 63 terms cannot be optimized */
108490 /* The number of tables in the FROM clause is limited by the number of
108541 /* Analyze all of the subexpressions. */
108592 - ** 2) The table must be the RHS of a LEFT JOIN.
108594 - ** must contain a constraint that limits the scan of the table to
108596 - ** 4) The table must not be referenced by any part of the query apart
108688 if( sqlite3WhereTrace & 0x100 ){ /* Display all terms of the WHERE clause */
108689 sqlite3DebugPrintf("---- WHERE clause at end of analysis:\n");
108709 /* If we know that only a prefix of the record will be used,
108748 + /* The nature of RIGHT JOIN processing is such that it messes up
108799 +** Return true if cursor iCur is opened by instruction k of the
108800 +** bytecode. Used inside of assert() only.
108818 ** Generate the end of the WHERE loop. See comments on
108833 + /* Terminate the subroutine that forms the interior of the loop of
108879 - /* The "break" point is here, just past the end of the outer loop.
108894 + ** unmatched rows of the right operand of the RIGHT JOIN with
108895 + ** all of the columns of the left operand set to NULL.
108902 /* For a co-routine, change all OP_Column references to the table of
108903 ** the co-routine into OP_Copy of result contained in a register.
108910 - /* Close all of the cursors that were opened by sqlite3WhereBegin.
108933 ** from the index instead of from the table where possible. In some cases
108976 + /* The "break" point is here, just past the end of the outer loop.
109053 /* The inline versions of min() and max() require a single ephemeral
109165 - ** new Expr to populate pOut. Set the span of pOut to be the identifier
110464 /********** End of lemon-generated parsing tables *****************************/
111351 ** of that rule */
112077 /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
113592 /* Expressions of the form
113597 ** regardless of the value of expr1.
114270 int nErr = 0; /* Number of errors encountered */
114272 int n = 0; /* Length of the next token token */
114388 +** Return the byte offset of the most recent error
114402 ** Return UTF-16 encoded English language explanation of the most recent
114413 + ** Search at http://web.archive.org/ to find the 2015-03-16 archive
114414 + ** of the link above to see the original text.
114461 + ** If 2, then invoke xAlt() instead of localtime(). If 0, normal
114470 + ** xAlt should write results in to struct tm object of its 2nd argument
114541 +** Return the name of the N-th database schema. Return NULL if N is out
114542 +** of range.
114559 ** Return the filename of the database associated with a database
114577 + int nRef; /* Number of pointers to this object */
114698 int nPoslist = 0; /* Number of bytes in aPoslist */
114699 int iPrev = -1; /* Token number of previous deferred token */
114793 /************** End of fts3_unicode2.c ***************************************/
114812 ** a JSONB type in the future which stores a binary encoding of JSON in
114843 -** Versions of isspace(), isalnum() and isdigit() to which it is safe
114847 - /* Use the SQLite core versions if this routine is part of the
114900 -** Some of the testcase() macros in this file are problematic for gcov
115100 +** always return a JSON representation of the result. If JSON_SQL is set,
115101 +** then always return an SQL representation of the result. If neither flag
115110 +** containing the result of each PATH.
115178 + ** element of the array being the value selected by one of the PATHs */
115222 JsonNode *pResult; /* The result of the merge */
115270 -** Return the top-level "type" of a JSON string. Throw an error if
115272 +** Return the top-level "type" of a JSON string. json_type() raises an
115379 /* Append the name of the path for element i to pStr
115577 -/************** End of json1.c ***********************************************/
115578 +/************** End of json.c ************************************************/
115588 -** Versions of isspace(), isalnum() and isdigit() to which it is safe
115593 /* Use the SQLite core versions if this routine is part of the
115664 int nRead; /* Total number of blocks read */
115707 /* stmt_vtab is a subclass of sqlite3_vtab which will
115708 ** serve as the underlying representation of a stmt virtual table
115921 ** change the value of the error code. The error-code preserving
115940 +** of the start of that token. ^The byte offset returned by
115947 ** the time of the first error and the call to these interfaces.
115970 ** implementation of [application-defined SQL functions] are protected.
115981 +** which is native to the platform, regardless of the text encoding set
115991 -** The these routines may attempt to convert the datatype of the result.
115992 +** These routines may attempt to convert the datatype of the result.
116011 +** of sqlite3_value_dup(V) is a NULL value.
116024 +** for the N-th database on database connection D, or a NULL pointer of N is
116025 +** out of range. An N value of 0 means the main database file. An N of 1 is
116026 +** the "temp" schema. Larger values of N correspond to various ATTACH-ed
116037 +** private copy of the result prior to releasing the mutex.
116048 -** an operator that is part of a constraint term in the wHERE clause of
116049 +** an operator that is part of a constraint term in the WHERE clause of
116068 +** ^The left-hand operand of the operator is given by the corresponding
116069 +** aConstraint[].iColumn field. ^An iColumn of -1 indicates the left-hand
116078 +** by the [xFindFunction|xFindFunction method] of the virtual table
116094 +** tables, the collating sequence of constraints does not matter (for example
116138 ** The counter is incremented on the first [sqlite3_step()] call of each
116145 +** <dd>^SQLITE_STMTSTATUS_FILTER_HIT is the number of times that a join
116147 +** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of
116148 +** times that the Bloom filter returned a find, and thus the join step
116152 ** <dd>^This is the approximate number of bytes of heap memory
116170 -** method of a [virtual table].
116171 +** method of a [virtual table]. This function returns a pointer to a string
116172 +** that is the name of the appropriate collation sequence to use for text
116189 -** containing the name of the collation sequence for the corresponding
116195 +** a [COLLATE operator], then the name of the collation specified by
116198 +** of the constraint specifies an alternative collating sequence via
116201 +** name of that alternative collating sequence is returned.
116212 +** of a [virtual table] implementation. The result of calling this
116213 +** interface from outside of xBestIndex() is undefined and probably harmful.
116219 +** can meet the ordering requirements of the query planner, it may set
116225 +** sort order defined by the "nOrderBy" and "aOrderBy" fields of the
116228 +** the xBestIndex method to set the "orderByConsumed" flag, regardless of
116241 +** combination of values in the columns identified by the "aOrderBy" field
116257 +** ^For the purposes of comparing virtual table output values to see if the
116270 +** ordered correctly. The use of the "orderByConsumed" flag and the
116272 +** use of the sqlite3_vtab_distinct() interface and the "orderByConsumed"
116284 +** [xBestIndex|xBestIndex() method] of a [virtual table] implementation.
116285 +** The result of invoking this interface from any other context is
116288 +** ^(A constraint on a virtual table of the form
116294 +** the usual mode of handling IN operators, SQLite generates [bytecode]
116296 +** on the right-hand side of the IN operator.)^ Thus the virtual table
116297 +** only sees a single value from the right-hand side of the IN operator
116301 +** table to see all values on the right-hand of the IN operator all at
116311 +** of the IN operator is even possible.
116331 +** ^(All-at-once processing of the IN operator is selected if both of the
116343 +** ^If either or both of the conditions above are false, then SQLite uses
116348 +** [sqlite3_vtab_in_next()] to find all values on the right-hand side
116349 +** of the IN constraint.
116354 +** CAPI3REF: Find all elements on the right-hand side of an IN constraint.
116357 +** [xFilter|xFilter() method] of a [virtual table] implementation.
116358 +** The result of invoking these interfaces from any other context
116362 +** sqlite3_vtab_in_next(X,P) must be one of the parameters to the
116372 +** of the IN constraint using code like the following:
116388 +** on the RHS of the IN constraint. ^If there are no more values on the
116389 +** right hand side of the IN constraint, then *P is set to NULL and these
116391 +** some other value, such as SQLITE_NOMEM, in the event of a malfunction.
116394 +** next call to either of these routines or until the end of the xFilter
116407 +** of a [virtual table] implementation. The result of calling this interface
116408 +** from outside of an xBestIndex method are undefined and probably harmful.
116411 +** the [xBestIndex] method of a [virtual table] implementation, with P being
116412 +** a copy of the [sqlite3_index_info] object pointer passed into xBestIndex and
116414 +** attempts to set *V to the value of the right-hand operand of
116419 +** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th
116425 +** the right-hand operand of a constraint is a literal value in the original
116435 +** and remains valid for the duration of the xBestIndex method call.
116439 +** The "_rhs_" in the name of this routine is an abbreviation for
116454 // Use of this source code is governed by a BSD-style license that can be
117123 -** Out-of-memory simulator variables
117126 -static unsigned int oomRepeat = 0; /* Number of OOMs in a row */
117131 ** This is the name of our program. It is set in main(), used
117132 ** in a number of other places, mostly for error messages.
117155 +** out-of-memory error.
117220 ** Return the value of a hexadecimal digit. Return -1 if the input
117277 +** The author disclaims copyright to this source code. In place of
117281 +** May you find forgiveness for yourself and forgive others.
117287 +** mechanism to add a tracing layer on top of SQLite. If this extension
117294 +** This extension is used to implement the --memtrace option of the
117388 ** The sha3(X) function computes the SHA3 hash of the input X, or NULL if
117391 -** The sha3_query(Y) function evalutes all queries in the SQL statements of Y
117392 +** The sha3_query(Y) function evaluates all queries in the SQL statements of Y
117393 ** and returns a hash of their results.
117414 ** The author disclaims copyright to this source code. In place of
117425 -** If neither of the optional arguments is present, then this UDF
117427 -** of bytes written is returned. If an error occurs, NULL is returned.
117432 -** field by the stat() system call). Three types of files may
117440 -** interpreted as text and used as the target of the link. For a
117442 -** named file. Regardless of the type of file, its permissions are
117446 -** as an integer - the number of seconds since the unix epoch. The
117447 -** modification-time of the target file is set to this value before
117455 -** Read and return the contents of file FILE (type blob) from disk.
117472 +** of digits compare in numeric order.
117475 -** mode: Value of stat.st_mode for directory entry (an integer).
117476 -** mtime: Value of stat.st_mtime for directory entry (an integer).
117478 -** symlink, a text value containing the text of the link. For a
117481 +** they do not mess of the maginitude comparison of embedded
117482 +** strings of digits. "x00123y" is equal to "x123y".
117486 -** And the paths returned in the "name" column of the table are also
117495 -** DLL form of this extension for WIN32. See its use below for details.
117496 +** * Embedded integers can be of arbitrary length. Comparison
117536 -** Structure of the fsdir() table-valued function
117537 +** Compare text in lexicographic order, except strings of digits
117542 -#define FSDIR_COLUMN_NAME 0 /* Name of the file */
117546 -#define FSDIR_COLUMN_PATH 4 /* Path to top of search */
117552 -** contents of file zName. Or, leave the result unchanged (NULL)
117559 -** off of disk.
117637 -** Implementation of the "readfile(X)" SQL function. The entire content
117638 -** of the file named X is read and returned as a BLOB. NULL is returned
117655 -** Set the error message contained in context ctx to the results of
117682 -** number of seconds since the Unix Epoch (1970-01-01 00:00:00 UTC).
117685 +** The author disclaims copyright to this source code. In place of
117689 +** May you find forgiveness for yourself and forgive others.
117753 + int nDigit; /* Total number of digits */
117754 + int nFrac; /* Number of digits to the right of the decimal point */
117755 + signed char *a; /* Array of digits. Most significant first. */
117790 -** This function is used in place of stat(). On Windows, special handling
117814 -** This function is used in place of lstat(). On Windows, special handling
117834 -** Argument zFile is the name of a file that will be created and/or written
117908 -** header comments at the top of this file for details.
118093 -** Implementation of the "writefile(W,X[,Y[,Z]]])" SQL function.
118094 -** Refer to header comments at the top of this file for details.
118109 - "wrong number of arguments to function writefile()", -1
118188 -** text string in the style of "ls -l".
118235 - char *zDir; /* Name of directory (nul-terminated) */
118241 - int nLvl; /* Number of entries in aLvl[] array */
118242 - int iLvl; /* Index of current entry */
118243 - FsdirLevel *aLvl; /* Hierarchy of directories being traversed */
118249 - char *zPath; /* Path to current entry */
118349 +** digits to the right of the decimal point.
118427 -** pCur to the results of vprintf(zFmt, ...).
118438 -** Advance an fsdir_cursor to its next row of output.
118507 -** Return values of columns for the row at which the series_cursor
118617 -** row a value 1 more than that of the previous.
118646 -** Return TRUE if the cursor has been moved off of the last
118647 -** row of output.
118661 +** Return the sum or difference of X and Y.
118798 -** The query plan is represented by values of idxNum:
118799 +** Return the product of X and Y.
118805 +** the number of digits after the decimal point is no less than
118806 +** either the number of digits in either input.
118817 - int idxPath = -1; /* Index in pIdxInfo->aConstraint of PATH= */
118818 - int idxDir = -1; /* Index in pIdxInfo->aConstraint of DIR= */
118932 - fsdirEof, /* xEof - check for end of scan */
119026 ** The author disclaims copyright to this source code. In place of
119029 ** May you find forgiveness for yourself and forgive others.
119038 +** and input of IEEE754 Binary64 floating-point numbers.
119048 +** The function will return a string of the form 'ieee754(Y,Z)' where
119051 -** The two query parameters are optional. $prefix is the text of the
119055 +** base-2 exponent of a new floating point number. The function returns
119064 -** This virtual table operates at the speed of human typing, and so there
119091 +** can be used to compute the exact decimal representation of binary64
119092 +** values. To begin, first compute a table of exponent values:
119106 +** Then, to compute the exact decimal representation of a floating
119134 -/* completion_vtab is a subclass of sqlite3_vtab which will
119135 -** serve as the underlying representation of a completion virtual table
119143 -/* completion_cursor is a subclass of sqlite3_vtab_cursor which will
119144 -** serve as the underlying representation of a cursor that scans
119145 -** over rows of the result
119151 - int nPrefix, nLine; /* Number of bytes in zPrefix and zLine */
119155 - int szRow; /* Length of the zCurrentRow string */
119186 -** Think of this routine as the constructor for completion_vtab objects.
119193 -** result set of queries against completion will look like.
119194 +** Implementation of the ieee754() function
119216 -#define COMPLETION_COLUMN_CANDIDATE 0 /* Suggested completion of the input */
119217 -#define COMPLETION_COLUMN_PREFIX 1 /* Prefix of the word to be completed */
119280 -** Advance a completion_cursor to its next row of output.
119282 -** The ->ePhase, ->j, and ->pStmt fields of the completion_cursor object
119283 -** record the current state of the scan. This routine sets ->zCurrentRow
119284 -** to the current row of output and then returns. If no more rows remain,
119286 -** table that has reached the end of its scan.
119290 -** take zLine into account to try to restrict the set of identifiers and
119291 -** keywords based on what would be legal at the current point of input.
119427 - /* Extract the next row of content */
119437 + /* Limit the range of e. Ticket 22dea1cfdb9151e4 2021-03-02 */
119494 -** Return values of columns for the row at which the completion_cursor
119540 -** Return TRUE if the cursor has been moved off of the last
119541 -** row of output.
119550 -** to the first row of output. This method is always called at least
119614 -** function: "prefix" and "wholeline". Bit 0 of idxNum is set if "prefix"
119627 - int prefixIdx = -1; /* Index of the start= constraint, or -1 if none */
119628 - int wholelineIdx = -1; /* Index of the stop= constraint, or -1 if none */
119629 - int nArg = 0; /* Number of arguments that completeFilter() expects */
119690 - completionEof, /* xEof - check for end of scan */
119764 ** The author disclaims copyright to this source code. In place of
119767 ** May you find forgiveness for yourself and forgive others.
119774 -** appended onto the end of some other file, such as an executable.
119780 -** A special record must appear at the end of the file that identifies the
119782 -** of the exposed content. (Or, it is the length of the content prefix.)
119792 +** of 5.
119799 +** Integers from 0 through 100 with a step size of 1.
119805 -** (4) If none of the above apply and the SQLITE_OPEN_CREATE flag is
119812 -** To avoid unnecessary complications with the PENDING_BYTE, the size of
119832 +** words, the following pairs of queries are equivalent to each other:
119851 +** to bound the sequence of generated values. If the equality constraints
119855 +** encourages the query planner to order joins such that the bounds of the
119864 -/* The append mark at the end of the database is:
119868 +/* series_cursor is a subclass of sqlite3_vtab_cursor which will
119869 +** serve as the underlying representation of a cursor that scans
119870 +** over rows of the result
119889 +** Think of this routine as the constructor for series_vtab objects.
119892 -** the offset to page 1, and also the length of the prefix content.
119898 +** result set of queries against generate_series will look like.
119936 -** Maximum size of the combined prefix + database + append-mark. This
119947 -** Try to align the database to an even multiple of APND_ROUNDUP bytes.
119966 -** Forward declaration of objects used by this utility
119984 -** An instance of this structure describes the appended database file.
119990 -** The structure of an AppendVFS database is like this:
120005 -** the offset from the start of prefix-file to the start
120006 -** of "database".
120008 -** The size of the database is iMark - iPgOne.
120011 -** of iPgOne stored as a big-ending 64-bit integer.
120013 -** iMark will be the size of the underlying file minus 25 (APND_MARKSIZE).
120016 +** Advance a series_cursor to its next row of output.
120020 - sqlite3_int64 iPgOne; /* Offset to the start of the database */
120021 - sqlite3_int64 iMark; /* Offset of the append mark. -1 if unwritten */
120037 +** Return values of columns for the row at which the series_cursor
120079 +** row a value 1 more than that of the previous.
120152 +** Return TRUE if the cursor has been moved off of the last
120153 +** row of output.
120169 +/* True to cause run-time checking of the start=, stop=, and/or step=
120188 -** Add the append-mark onto what should become the end of the file.
120190 -* Parameter iWriteEnd is the appendvfs-relative offset of the new mark.
120192 +** to the first row of output. This method is always called at least
120209 +** is pointing at the first row, or pointing off the end of the table
120281 + /* If any of the constraints have a NULL value, then return no rows.
120334 + int unusableMask = 0; /* Mask of unusable constraints */
120335 + int nArg = 0; /* Number of arguments that seriesFilter() expects */
120352 -** Return the current file-size of an apnd-file.
120397 + ** are unusable constraints on any of start, stop, or step then
120415 + /* If either boundary is missing, we have to generate a huge span
120416 + ** of numbers. Make this case very expensive so that the query
120444 + seriesEof, /* xEof - check for end of scan */
120514 +** The author disclaims copyright to this source code. In place of
120518 +** May you find forgiveness for yourself and forgive others.
120536 +** X* zero or more occurrences of X
120537 +** X+ one or more occurrences of X
120538 +** X? zero or one occurrences of X
120539 +** X{p,q} between p and q occurrences of X
120542 +** ^X X occurring at the beginning of the string
120543 +** X$ X occurring at the end of the string
120545 +** \c Character c where c is one of \{}()[]|*+?.
120562 +** performance is bounded by O(N*M) where N is the size of the regular
120563 +** expression and M is the size of the input string. The matcher never
120565 +** to p copies of X following by q-p copies of X? and that the size of the
120580 +** The following #defines change the names of some functions implemented in
120581 +** this file to prevent name collisions with C-library functions of the
120603 +/* The end-of-input character */
120604 +#define RE_EOF 0 /* End of input */
120611 +/* The NFA is implemented as sequence of opcodes taken from the following
120616 +#define RE_OP_ANYSTAR 3 /* Special optimized version of .* */
120620 +#define RE_OP_CC_INC 7 /* Beginning of a [...] character class */
120621 +#define RE_OP_CC_EXC 8 /* Beginning of a [^...] character class */
120623 +#define RE_OP_CC_RANGE 10 /* Range of values in a character class */
120645 +** once. An instance of the following object records all active states in
120647 +** number of actives states is small.
120650 + unsigned nState; /* Number of current states */
120663 +/* A compiled NFA (or an NFA that is in the process of being compiled) is
120664 +** an instance of the following object.
120674 + int nInit; /* Number of characters in zInit */
120675 + unsigned nState; /* Number of entries in aOp[] and aArg[] */
120686 -/* Fetch a page of a memory-mapped file */
120697 +** *pzIn to the first byte past the end of the character returned. To
120746 -** Try to read the append-mark off the end of a file. Return the
120747 -** start of the appended database if the append-mark is present.
120750 -** An append-mark is only valid if the NNNNNNNN start-of-database offset
120752 -** start-of-database value must be a multiple of 512.
120975 +/* Append a new opcode and argument to the end of the RE under construction.
120981 +/* Make a copy of N opcodes starting at iStart onto the end of the RE
121052 +/* Peek at the next byte of input */
121057 +/* Compile RE text into a sequence of opcodes. Continue up to the
121079 +/* Compile an element of regular expression text (anything that can be
121286 + return "out of memory";
121295 + return "out of memory";
121384 +** Implementation of the regexp() SQL function. This function implements
121523 + ** of regexp(PATTERN,STRING). */
121542 ** The author disclaims copyright to this source code. In place of
121545 ** May you find forgiveness for yourself and forgive others.
121551 -** mechanism to add a tracing layer on top of SQLite. If this extension
121558 -** This extension is used to implement the --memtrace option of the
121653 -** The author disclaims copyright to this source code. In place of
121659 -** May you find forgiveness for yourself and forgive others.
121664 +** If neither of the optional arguments is present, then this UDF
121666 +** of bytes written is returned. If an error occurs, NULL is returned.
121672 +** field by the stat() system call). Three types of files may
121676 -** of digits compare in numeric order.
121682 -** they do not mess of the maginitude comparison of embedded
121683 -** strings of digits. "x00123y" is equal to "x123y".
121685 +** interpreted as text and used as the target of the link. For a
121687 +** named file. Regardless of the type of file, its permissions are
121694 +** as an integer - the number of seconds since the unix epoch. The
121695 +** modification-time of the target file is set to this value before
121698 -** * Embedded integers can be of arbitrary length. Comparison
121709 -** Compare text in lexicographic order, except strings of digits
121773 -** The author disclaims copyright to this source code. In place of
121778 -** May you find forgiveness for yourself and forgive others.
121780 +** Read and return the contents of file FILE (type blob) from disk.
121800 +** mode: Value of stat.st_mode for directory entry (an integer).
121801 +** mtime: Value of stat.st_mtime for directory entry (an integer).
121803 +** symlink, a text value containing the text of the link. For a
121808 +** And the paths returned in the "name" column of the table are also
121814 +** DLL form of this extension for WIN32. See its use below for details.
121863 - int nDigit; /* Total number of digits */
121864 - int nFrac; /* Number of digits to the right of the decimal point */
121865 - signed char *a; /* Array of digits. Most significant first. */
121870 +** Structure of the fsdir() table-valued function
121877 +#define FSDIR_COLUMN_NAME 0 /* Name of the file */
121881 +#define FSDIR_COLUMN_PATH 4 /* Path to top of search */
121898 +** contents of file zName. Or, leave the result unchanged (NULL)
121905 +** off of disk.
122107 +** Implementation of the "readfile(X)" SQL function. The entire content
122108 +** of the file named X is read and returned as a BLOB. NULL is returned
122138 +** Set the error message contained in context ctx to the results of
122180 +** number of seconds since the Unix Epoch (1970-01-01 00:00:00 UTC).
122224 -** digits to the right of the decimal point.
122358 +** This function is used in place of stat(). On Windows, special handling
122397 -** Return the sum or difference of X and Y.
122398 +** This function is used in place of lstat(). On Windows, special handling
122431 +** Argument zFile is the name of a file that will be created and/or written
122492 +** header comments at the top of this file for details.
122628 +** Implementation of the "writefile(W,X[,Y[,Z]]])" SQL function.
122629 +** Refer to header comments at the top of this file for details.
122664 + "wrong number of arguments to function writefile()", -1
122699 -** Return the product of X and Y.
122704 -** the number of digits after the decimal point is no less than
122705 -** either the number of digits in either input.
122707 +** text string in the style of "ls -l".
122787 + char *zDir; /* Name of directory (nul-terminated) */
122793 + int nLvl; /* Number of entries in aLvl[] array */
122794 + int iLvl; /* Index of current entry */
122795 + FsdirLevel *aLvl; /* Hierarchy of directories being traversed */
122801 + char *zPath; /* Path to current entry */
122940 -** The author disclaims copyright to this source code. In place of
122944 -** May you find forgiveness for yourself and forgive others.
122950 -** and input of IEEE754 Binary64 floating-point numbers.
122956 -** The function will return a string of the form 'ieee754(Y,Z)' where
122960 -** base-2 exponent of a new floating point number. The function returns
122989 -** can be used to compute the exact decimal representation of binary64
122990 -** values. To begin, first compute a table of exponent values:
123004 -** Then, to compute the exact decimal representation of a floating
123024 +** pCur to the results of vprintf(zFmt, ...).
123044 -** Implementation of the ieee754() function
123045 +** Advance an fsdir_cursor to its next row of output.
123170 - /* Limit the range of e. Ticket 22dea1cfdb9151e4 2021-03-02 */
123176 +** Return values of columns for the row at which the series_cursor
123273 +** row a value 1 more than that of the previous.
123286 +** Return TRUE if the cursor has been moved off of the last
123287 +** row of output.
123368 +** The query plan is represented by values of idxNum:
123390 + int idxPath = -1; /* Index in pIdxInfo->aConstraint of PATH= */
123391 + int idxDir = -1; /* Index in pIdxInfo->aConstraint of DIR= */
123464 + fsdirEof, /* xEof - check for end of scan */
123553 ** The author disclaims copyright to this source code. In place of
123567 -** of 5.
123571 -** Integers from 0 through 100 with a step size of 1.
123593 -** words, the following pairs of queries are equivalent to each other:
123604 +** The two query parameters are optional. $prefix is the text of the
123620 +** This virtual table operates at the speed of human typing, and so there
123626 -** to bound the sequence of generated values. If the equality constraints
123630 -** encourages the query planner to order joins such that the bounds of the
123641 +/* completion_vtab is a subclass of sqlite3_vtab which will
123642 +** serve as the underlying representation of a completion virtual table
123650 -/* series_cursor is a subclass of sqlite3_vtab_cursor which will
123651 +/* completion_cursor is a subclass of sqlite3_vtab_cursor which will
123652 ** serve as the underlying representation of a cursor that scans
123653 ** over rows of the result
123662 + int nPrefix, nLine; /* Number of bytes in zPrefix and zLine */
123666 + int szRow; /* Length of the zCurrentRow string */
123698 -** Think of this routine as the constructor for series_vtab objects.
123699 +** Think of this routine as the constructor for completion_vtab objects.
123707 -** result set of queries against generate_series will look like.
123708 +** result set of queries against completion will look like.
123735 +#define COMPLETION_COLUMN_CANDIDATE 0 /* Suggested completion of the input */
123736 +#define COMPLETION_COLUMN_PREFIX 1 /* Prefix of the word to be completed */
123815 -** Advance a series_cursor to its next row of output.
123816 +** Advance a completion_cursor to its next row of output.
123818 +** The ->ePhase, ->j, and ->pStmt fields of the completion_cursor object
123819 +** record the current state of the scan. This routine sets ->zCurrentRow
123820 +** to the current row of output and then returns. If no more rows remain,
123822 +** table that has reached the end of its scan.
123826 +** take zLine into account to try to restrict the set of identifiers and
123827 +** keywords based on what would be legal at the current point of input.
123918 + /* Extract the next row of content */
123941 -** Return values of columns for the row at which the series_cursor
123942 +** Return values of columns for the row at which the completion_cursor
123983 -** row a value 1 more than that of the previous.
123995 ** Return TRUE if the cursor has been moved off of the last
123996 ** row of output.
124010 -/* True to cause run-time checking of the start=, stop=, and/or step=
124021 ** to the first row of output. This method is always called at least
124038 -** is pointing at the first row, or pointing off the end of the table
124086 - /* If any of the constraints have a NULL value, then return no rows.
124141 +** function: "prefix" and "wholeline". Bit 0 of idxNum is set if "prefix"
124154 - int unusableMask = 0; /* Mask of unusable constraints */
124155 - int nArg = 0; /* Number of arguments that seriesFilter() expects */
124157 + int prefixIdx = -1; /* Index of the start= constraint, or -1 if none */
124158 + int wholelineIdx = -1; /* Index of the stop= constraint, or -1 if none */
124159 + int nArg = 0; /* Number of arguments that completeFilter() expects */
124217 - ** are unusable constraints on any of start, stop, or step then
124238 - /* If either boundary is missing, we have to generate a huge span
124239 - ** of numbers. Make this case very expensive so that the query
124272 - seriesEof, /* xEof - check for end of scan */
124279 + completionEof, /* xEof - check for end of scan */
124329 ** The author disclaims copyright to this source code. In place of
124339 +** appended onto the end of some other file, such as an executable.
124347 +** A special record must appear at the end of the file that identifies the
124349 +** of the exposed content. (Or, it is the length of the content prefix.)
124359 -** X* zero or more occurrences of X
124360 -** X+ one or more occurrences of X
124361 -** X? zero or one occurrences of X
124362 -** X{p,q} between p and q occurrences of X
124365 -** ^X X occurring at the beginning of the string
124366 -** X$ X occurring at the end of the string
124368 -** \c Character c where c is one of \{}()[]|*+?.
124391 +** (4) If none of the above apply and the SQLITE_OPEN_CREATE flag is
124396 +** To avoid unnecessary complications with the PENDING_BYTE, the size of
124403 -** performance is bounded by O(N*M) where N is the size of the regular
124404 -** expression and M is the size of the input string. The matcher never
124406 -** to p copies of X following by q-p copies of X? and that the size of the
124421 -** The following #defines change the names of some functions implemented in
124422 -** this file to prevent name collisions with C-library functions of the
124424 +/* The append mark at the end of the database is:
124430 +** the offset to page 1, and also the length of the prefix content.
124436 -/* The end-of-input character */
124437 -#define RE_EOF 0 /* End of input */
124443 -/* The NFA is implemented as sequence of opcodes taken from the following
124446 +** Maximum size of the combined prefix + database + append-mark. This
124451 -#define RE_OP_ANYSTAR 3 /* Special optimized version of .* */
124455 -#define RE_OP_CC_INC 7 /* Beginning of a [...] character class */
124456 -#define RE_OP_CC_EXC 8 /* Beginning of a [^...] character class */
124458 -#define RE_OP_CC_RANGE 10 /* Range of values in a character class */
124471 +** Try to align the database to an even multiple of APND_ROUNDUP bytes.
124480 -** once. An instance of the following object records all active states in
124482 -** number of actives states is small.
124484 +** Forward declaration of objects used by this utility
124487 - unsigned nState; /* Number of current states */
124506 -/* A compiled NFA (or an NFA that is in the process of being compiled) is
124507 -** an instance of the following object.
124510 +** An instance of this structure describes the appended database file.
124516 +** The structure of an AppendVFS database is like this:
124531 +** the offset from the start of prefix-file to the start
124532 +** of "database".
124534 +** The size of the database is iMark - iPgOne.
124537 +** of iPgOne stored as a big-ending 64-bit integer.
124539 +** iMark will be the size of the underlying file minus 25 (APND_MARKSIZE).
124550 - int nInit; /* Number of characters in zInit */
124551 - unsigned nState; /* Number of entries in aOp[] and aArg[] */
124555 + sqlite3_int64 iPgOne; /* Offset to the start of the database */
124556 + sqlite3_int64 iMark; /* Offset of the append mark. -1 if unwritten */
124589 -** *pzIn to the first byte past the end of the character returned. To
124725 +** Add the append-mark onto what should become the end of the file.
124727 +* Parameter iWriteEnd is the appendvfs-relative offset of the new mark.
124946 -/* Append a new opcode and argument to the end of the RE under construction.
124957 -/* Make a copy of N opcodes starting at iStart onto the end of the RE
124960 +** Return the current file-size of an apnd-file.
125045 -/* Peek at the next byte of input */
125056 -/* Compile RE text into a sequence of opcodes. Continue up to the
125089 -/* Compile an element of regular expression text (anything that can be
125269 +/* Fetch a page of a memory-mapped file */
125292 +** Try to read the append-mark off the end of a file. Return the
125293 +** start of the appended database if the append-mark is present.
125296 +** An append-mark is only valid if the NNNNNNNN start-of-database offset
125298 +** start-of-database value must be a multiple of 512.
125409 - return "out of memory";
125421 - return "out of memory";
125503 -** Implementation of the regexp() SQL function. This function implements
125650 - ** of regexp(PATTERN,STRING). */
125688 ZipfileEntry e; /* New entry to add to zip archive */
125817 /* Copy the entire schema of database [db] into [dbm]. */
125847 ** instance of the following structure.
125849 u8 eTraceType; /* SHELL_TRACE_* value for type of trace */
125851 u8 bSafeModePersist; /* The long-term value of bSafeMode */
125854 unsigned mEqpLines; /* Mask of veritical lines in the EQP output graph */
125855 + int inputNesting; /* Track nesting level of .read and other redirects */
125857 int cnt; /* Number of records displayed so far */
125858 int lineno; /* Line number of last line read from in */
125891 +#define MODE_Count 17 /* Output only a count of the rows of output */
126004 +** Maybe construct two lines of text that point out the position of a
126120 ** and ends on one of:
126123 int nAlloc = 0; /* Allocated size of p->aiIndent[], abYield */
126124 int iOp; /* Index of operation in p->aiIndent[] */
126165 +** z[] is a line of text that is to be displayed the .mode box or table or
126169 +** Compute characters to display on the first line of z[]. Stop at the
126171 +** from malloc()) of that first line, which caller should free sometime.
126177 + const unsigned char **pzTail, /* OUT: Tail of the input for next line */
126261 +/* Extract the value of the i-th current column for pStmt as an SQL literal
126294 ** Run a prepared statement and output the result in one of the
126491 + raw_printf(stderr, "sqlite3_expert_new: %s\n", zErr ? zErr : "out of memory");
126586 ** Text of help messages.
126592 ** There must be two or more spaces between the end of the command and the
126593 ** start of the description of what that command does.
126600 " Each command must have exactly one of the following options:",
126617 ".changes on|off Show number of rows changed by SQL",
126623 ".databases List names and files of attached databases",
126636 ".excel Display the output of next command in spreadsheet",
126646 ".fullschema ?--indent? Show schema and the content of sqlite_stat tables",
126647 ".headers on|off Turn display of headers on or off",
126654 " --skip N Skip the first N rows of input",
126658 " * If TABLE does not exist, it is created. The first row of input",
126680 " MODE is one of:",
126717 + " TABLE The name of SQL table used for \"insert\" mode",
126721 ".nullvalue STRING Use STRING in place of NULL values",
126736 " --append Use appendvfs to append database to the end of FILE",
126740 " --hexdb Load the output of \"dbtotxt\" as an in-memory db",
126774 ".restore ?DB? FILE Restore content of DB (default \"main\") from FILE",
126798 ".tables ?TABLE? List names of tables matching LIKE pattern TABLE",
126815 ** text of all commands that match. */
126823 n = (n+pgsz-1)&~(pgsz-1); /* Round n up to the next multiple of pgsz */
126826 - utf8_printf(stderr, "Out of memory!\n");
127088 + * pointer is non-zero, its referent will be set to a summary of renames
127111 + * from protected part of incoming column names. This defaults to "_"
127347 ** Then read the content of the testcase-out.txt file and compare against
127439 char *zFile = 0; /* Name of file to extra content from */
127441 int nCol; /* Number of columns in the table */
127444 int nSep; /* Number of bytes in p->colSeparator[] */
127724 + * overwrites already-set values, user was informed of this.
127835 raw_printf(stderr, "Error: mode should be one of: "
127857 ** at the end of this procedure */
127898 char *zNewFilename = 0; /* Name of the database file to open */
127899 int iName = 1; /* Index in azArg[] of the filename */
128340 +** without moving lots of code around (creating a larger/messier diff).
128372 int startline = 0; /* Line number for start of current input */
128601 +** portable enough to make real use of.
128608 +** Returns the filename of the given db name, assuming "main" if
128620 +** purposes of the fiddle build, that the file is in a transient
128692 ** This file is an amalgamation of many separate C source files from SQLite
128723 ** change the value of the error code. The error-code preserving
128742 +** of the start of that token. ^The byte offset returned by
128749 ** the time of the first error and the call to these interfaces.
128772 ** implementation of [application-defined SQL functions] are protected.
128783 +** which is native to the platform, regardless of the text encoding set
128793 -** The these routines may attempt to convert the datatype of the result.
128794 +** These routines may attempt to convert the datatype of the result.
128813 +** of sqlite3_value_dup(V) is a NULL value.
128826 +** for the N-th database on database connection D, or a NULL pointer of N is
128827 +** out of range. An N value of 0 means the main database file. An N of 1 is
128828 +** the "temp" schema. Larger values of N correspond to various ATTACH-ed
128839 +** private copy of the result prior to releasing the mutex.
128850 -** an operator that is part of a constraint term in the wHERE clause of
128851 +** an operator that is part of a constraint term in the WHERE clause of
128870 +** ^The left-hand operand of the operator is given by the corresponding
128871 +** aConstraint[].iColumn field. ^An iColumn of -1 indicates the left-hand
128880 +** by the [xFindFunction|xFindFunction method] of the virtual table
128896 +** tables, the collating sequence of constraints does not matter (for example
128940 ** The counter is incremented on the first [sqlite3_step()] call of each
128947 +** <dd>^SQLITE_STMTSTATUS_FILTER_HIT is the number of times that a join
128949 +** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of
128950 +** times that the Bloom filter returned a find, and thus the join step
128954 ** <dd>^This is the approximate number of bytes of heap memory
128972 -** method of a [virtual table].
128973 +** method of a [virtual table]. This function returns a pointer to a string
128974 +** that is the name of the appropriate collation sequence to use for text
128991 -** containing the name of the collation sequence for the corresponding
128997 +** a [COLLATE operator], then the name of the collation specified by
129000 +** of the constraint specifies an alternative collating sequence via
129003 +** name of that alternative collating sequence is returned.
129014 +** of a [virtual table] implementation. The result of calling this
129015 +** interface from outside of xBestIndex() is undefined and probably harmful.
129021 +** can meet the ordering requirements of the query planner, it may set
129027 +** sort order defined by the "nOrderBy" and "aOrderBy" fields of the
129030 +** the xBestIndex method to set the "orderByConsumed" flag, regardless of
129043 +** combination of values in the columns identified by the "aOrderBy" field
129059 +** ^For the purposes of comparing virtual table output values to see if the
129072 +** ordered correctly. The use of the "orderByConsumed" flag and the
129074 +** use of the sqlite3_vtab_distinct() interface and the "orderByConsumed"
129086 +** [xBestIndex|xBestIndex() method] of a [virtual table] implementation.
129087 +** The result of invoking this interface from any other context is
129090 +** ^(A constraint on a virtual table of the form
129096 +** the usual mode of handling IN operators, SQLite generates [bytecode]
129098 +** on the right-hand side of the IN operator.)^ Thus the virtual table
129099 +** only sees a single value from the right-hand side of the IN operator
129103 +** table to see all values on the right-hand of the IN operator all at
129113 +** of the IN operator is even possible.
129133 +** ^(All-at-once processing of the IN operator is selected if both of the
129145 +** ^If either or both of the conditions above are false, then SQLite uses
129150 +** [sqlite3_vtab_in_next()] to find all values on the right-hand side
129151 +** of the IN constraint.
129156 +** CAPI3REF: Find all elements on the right-hand side of an IN constraint.
129159 +** [xFilter|xFilter() method] of a [virtual table] implementation.
129160 +** The result of invoking these interfaces from any other context
129164 +** sqlite3_vtab_in_next(X,P) must be one of the parameters to the
129174 +** of the IN constraint using code like the following:
129190 +** on the RHS of the IN constraint. ^If there are no more values on the
129191 +** right hand side of the IN constraint, then *P is set to NULL and these
129193 +** some other value, such as SQLITE_NOMEM, in the event of a malfunction.
129196 +** next call to either of these routines or until the end of the xFilter
129209 +** of a [virtual table] implementation. The result of calling this interface
129210 +** from outside of an xBestIndex method are undefined and probably harmful.
129213 +** the [xBestIndex] method of a [virtual table] implementation, with P being
129214 +** a copy of the [sqlite3_index_info] object pointer passed into xBestIndex and
129216 +** attempts to set *V to the value of the right-hand operand of
129221 +** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th
129227 +** the right-hand operand of a constraint is a literal value in the original
129237 +** and remains valid for the duration of the xBestIndex method call.
129241 +** The "_rhs_" in the name of this routine is an abbreviation for
129399 /************** End of parse.h ***********************************************/
129403 ** Round up a number to the next larger multiple of 8. This is used
129408 +** ROUND8P() assumes that the argument is already an integer number of
129420 ** Round down to the nearest multiple of 8
129492 ** used in the journal to signify that the remainder of the journal file
129528 -#define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */
129540 +#define P4_INTARRAY (-14) /* P4 is a vector of 32-bit integers */
129805 +#define OP_Rowid 135 /* synopsis: r[P2]=PX rowid of P1 */
129909 ** the value of the largest JUMP opcode. The smaller the maximum
129912 ** together near the beginning of the list.
129917 /************** End of opcodes.h *********************************************/
129942 +/* Maximum number of symlinks that will be resolved while trying to
129950 ** The default size of a disk sector
129956 + int errByteOffset; /* Byte offset of error in SQL statement */
130023 + char *z; /* Cache of aMem[0].z for vdbeRecordCompareString() */
130024 + i64 i; /* Cache of aMem[0].u.i for vdbeRecordCompareInt() */
130026 + int n; /* Cache of aMem[0].n used by vdbeRecordCompareString() */
130027 u16 nField; /* Number of entries in apMem[] */
130032 ** TK_SELECT_COLUMN: column of the result vector */
130033 i16 iAgg; /* Which entry in pAggInfo->aCol[] or ->aFunc[] */
130034 - int iRightJoinTable; /* If EP_FromJoin, the right table of the join */
130037 + int iOfst; /* else: start of token from start of statement */
130046 -#define EP_FromJoin 0x000001 /* Originates in ON/USING clause of outer join */
130048 -#define EP_HasFunc 0x000004 /* Contains one or more functions of any kind */
130050 +#define EP_OuterON 0x000001 /* Originates in ON/USING clause of outer join */
130051 +#define EP_InnerON 0x000002 /* Originates in ON/USING of an inner join */
130053 +#define EP_HasFunc 0x000008 /* Contains one or more functions of any kind */
130102 /* Macros used to ensure that the correct members of unions are accessed
130108 - u8 sortFlags; /* Mask of KEYINFO_ORDER_* flags */
130109 - unsigned eEName :2; /* Meaning of zEName */
130115 + u8 sortFlags; /* Mask of KEYINFO_ORDER_* flags */
130116 + unsigned eEName :2; /* Meaning of zEName */
130122 + unsigned bUsingTerm:1; /* Term from the USING clause of a NestedFrom */
130130 ** If "a" is the k-th column of table "t", then IdList.a[0].idx==k.
130133 + int nId; /* Number of identifiers on the list */
130134 + u8 eU4; /* Which element of a.u4 is valid */
130136 char *zName; /* Name of the identifier */
130137 - int idx; /* Index in some Table.aCol[] of a column named zName */
130139 - int nId; /* Number of identifiers on the list */
130141 + int idx; /* Index in some Table.aCol[] of a column named zName */
130148 +** Allowed values for IdList.eType, which determines which value of the a.u4
130156 ** The SrcItem object represents a single term in the FROM clause of a query.
130157 ** The SrcList object is mostly an array of SrcItems.
130174 - Expr *pOn; /* The ON clause of a join */
130175 - IdList *pUsing; /* The USING clause of a join */
130177 + Expr *pOn; /* fg.isUsing==0 => The ON clause of a join */
130178 + IdList *pUsing; /* fg.isUsing==1 => The USING clause of a join */
130180 Bitmask colUsed; /* Bit N (1<<N) set if column N of pTab is used */
130192 + Expr *pOn; /* The ON clause of a join */
130193 + IdList *pUsing; /* The USING clause of a join */
130197 ** The following structure describes the FROM clause of a SELECT statement.
130198 ** Each table or subquery in the FROM clause is a separate element of
130201 ** Permitted values of the SrcList.a.jointype field
130203 -#define JT_INNER 0x0001 /* Any kind of inner or cross join */
130204 -#define JT_CROSS 0x0002 /* Explicit use of the CROSS keyword */
130211 +#define JT_INNER 0x01 /* Any kind of inner or cross join */
130212 +#define JT_CROSS 0x02 /* Explicit use of the CROSS keyword */
130217 +#define JT_LTORJ 0x40 /* One of the LEFT operands of a RIGHT JOIN
130222 ** Flags appropriate for the wctrlFlags parameter of sqlite3WhereBegin()
130233 #define SF_CopyCte 0x4000000 /* SELECT statement is a copy of a CTE */
130240 ** The results of a SELECT can be distributed in several ways, as defined
130241 ** by one of the following macros. The "SRT" prefix means "SELECT Result
130244 u8 disableLookaside; /* Number of times lookaside has been disabled */
130254 + TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */
130255 + ParseCleanup *pCleanup; /* List of cleanup operations to run after parse */
130257 int addrCrTab; /* Address of OP_CreateBtree on CREATE TABLE */
130268 Token sArg; /* Complete text of a module argument */
130271 - TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */
130273 - ParseCleanup *pCleanup; /* List of cleanup operations to run after parse */
130279 ** Sizes and pointers of various parts of the Parse object.
130291 - * Each trigger present in the database schema is stored as an instance of
130294 - * Pointers to instances of struct Trigger are stored in two ways.
130295 - * 1. In the "trigHash" hash table (part of the sqlite3* that represents the
130298 - * pNext member of struct Trigger. A pointer to the first element of the
130299 - * linked list is stored as the "pTrigger" member of the associated
130302 - * The "step_list" member points to the first element of a linked list
130305 +** Each trigger present in the database schema is stored as an instance of
130308 +** Pointers to instances of struct Trigger are stored in two ways.
130309 +** 1. In the "trigHash" hash table (part of the sqlite3* that represents the
130312 +** pNext member of struct Trigger. A pointer to the first element of the
130313 +** linked list is stored as the "pTrigger" member of the associated
130316 +** The "step_list" member points to the first element of a linked list
130320 char *zName; /* The name of the trigger */
130326 - * An instance of struct TriggerStep is used to store a single SQL statement
130327 - * that is a part of a trigger-program.
130329 - * Instances of struct TriggerStep are stored in a singly linked list (linked
130330 - * using the "pNext" member) referenced by the "step_list" member of the
130331 - * associated struct Trigger instance. The first element of the linked list is
130332 - * the first step of the trigger-program.
130335 - * "SELECT" statement. The meanings of the other members is determined by the
130336 - * value of "op" as follows:
130342 - * zTarget -> Dequoted name of the table to insert into.
130350 - * zTarget -> Dequoted name of the table to delete from.
130351 - * pWhere -> The WHERE clause of the DELETE statement if one is specified.
130355 - * zTarget -> Dequoted name of the table to update.
130356 - * pWhere -> The WHERE clause of the UPDATE statement if one is specified.
130358 - * pExprList -> A list of the columns to update and the expressions to update
130359 - * them to. See sqlite3Update() documentation of "pChanges"
130363 +** An instance of struct TriggerStep is used to store a single SQL statement
130364 +** that is a part of a trigger-program.
130366 +** Instances of struct TriggerStep are stored in a singly linked list (linked
130367 +** using the "pNext" member) referenced by the "step_list" member of the
130368 +** associated struct Trigger instance. The first element of the linked list is
130369 +** the first step of the trigger-program.
130372 +** "SELECT" statement. The meanings of the other members is determined by the
130373 +** value of "op" as follows:
130379 +** zTarget -> Dequoted name of the table to insert into.
130386 +** zTarget -> Dequoted name of the table to delete from.
130387 +** pWhere -> The WHERE clause of the DELETE statement if one is specified.
130391 +** zTarget -> Dequoted name of the table to update.
130392 +** pWhere -> The WHERE clause of the UPDATE statement if one is specified.
130394 +** pExprList -> A list of the columns to update and the expressions to update
130395 +** them to. See sqlite3Update() documentation of "pChanges"
130402 +** pExprList -> The list of expressions that follow the RETURNING keyword.
130406 u8 op; /* One of TK_DELETE, TK_UPDATE, TK_INSERT, TK_SELECT,
130627 /************** End of os_common.h *******************************************/
130633 +** To modify this header, edit any of the various lists in that script
130634 +** which specify categories of generated conditionals in this file.
130729 u8 eCurType; /* One of the CURTYPE_* values above */
130730 - i8 iDb; /* Index of cursor database in db->aDb[] (or -1) */
130731 + i8 iDb; /* Index of cursor database in db->aDb[] */
130739 - Bool hasBeenDuped:1; /* This cursor was source or target of OP_OpenDup */
130751 ** Vdbe.cacheCtr. Vdbe.cacheCtr will never take on the value of
130769 + int n; /* Number of characters in string value, excluding '\0' */
130770 u16 flags; /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */
130773 - int n; /* Number of characters in string value, excluding '\0' */
130778 int szMalloc; /* Size of the zMalloc allocation */
130784 Mem *pScopyFrom; /* This Mem is a shallow copy of pScopyFrom */
130786 ** Size of struct Mem not including the Mem.zMalloc member or anything that
130792 -/* One or more of the following flags are set to indicate the validOK
130793 +/* One or more of the following flags are set to indicate the
130794 ** representations of the value stored in the Mem struct.
130819 +** * MEM_Blob|MEM_Zero A blob in Mem.z of length Mem.n plus
130842 #define MEM_AffMask 0x003f /* Mask of affinity bits */
130844 +/* Extra bits that modify the meanings of the core datatypes above
130850 -#define MEM_TypeMask 0xc1bf /* Mask of type bits */
130853 +#define MEM_Zero 0x0400 /* Mem.i contains count of 0s appended to blob */
130855 +#define MEM_TypeMask 0x0dbf /* Mask of type bits */
130857 -/* Whenever Mem contains a valid string or blob representation, one of
130869 -#define MEM_Zero 0x4000 /* Mem.i contains count of 0s appended to blob */
130890 +** A Memory cell is initialized if at least one of the
130902 int iOp; /* Instruction number of OP_Function */
130906 u8 argc; /* Number of arguments */
130909 Vdbe *pPrev,*pNext; /* Linked list of VDBEs with the same Vdbe.db */
130911 ynVar nVar; /* Number of entries in aVar[] */
130912 - u32 iVdbeMagic; /* Magic number defining state of the SQL statement */
130913 int nMem; /* Number of memory locations currently allocated */
130914 int nCursor; /* Number of slots in apCsr[] */
130917 u8 errorAction; /* Recovery action to do in case of an error */
130921 + u8 eVdbeState; /* On of the VDBE_*_STATE values */
130929 yDbMask btreeMask; /* Bitmask of db->aDb[] entries referenced */
130930 yDbMask lockMask; /* Subset of btreeMask that requires a lock */
130933 char *zSql; /* Text of the SQL statement that generated this */
130935 char *zNormSql; /* Normalization of the associated SQL statement */
130960 +** An instance of this object is used to pass an vector of values into
130961 +** OP_VFilter, the xFilter method of a virtual table. The vector is the
130962 +** set of values on the right-hand side of an IN constraint.
130967 +** and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces
130969 +** right operand of the IN constraint.
130977 +/* Size of content associated with serial types that fit into a
131038 ** non-zero on any kind of error.
131045 +** invoked in place of the OS-defined localtime() function.
131048 ** library function localtime_r() is used to assist in the calculation of
131107 /* Initialize the contents of sLocal to avoid a compiler warning. */
131184 ** of several units of time.
131188 - u8 nName; /* Length of th name */
131189 - char *zName; /* Name of the transformation */
131192 + u8 nName; /* Length of the name */
131193 + char zName[7]; /* Name of the transformation */
131214 const char *z, /* The text of the modifier */
131215 int n, /* Length of zMod in bytes */
131218 + int idx /* Parameter index of the modifier */
131254 + ** value in the allowed range of julian day numbers understood by
131378 +** Return the number of seconds (including fractional seconds) since
131379 +** the unix epoch of 1970-01-01 00:00:00 GMT.
131520 ** Free any prior content in *pz and replace it with a copy of zNew.
131551 + sqlite3ErrorMsg(db->pParse, "out of memory");
131617 } /* End of function */
131621 +** The z string points to the first character of a token that is
131644 +** If pExpr has a byte offset for the start of a token, record that as
131659 ** able to accept at least N more bytes of text.
131661 ** Return the number of bytes of text that StrAccum is able to accept
131692 ** Finished with one layer of the tree
131707 ** Generate a single line of output for the tree, with a prefix that contains
131725 ** Shorthand for starting a new tree item that consists of a single label
131734 +** Show a list of Column objects in tree format.
131781 ** Generate a human-readable description of a WITH clause.
132175 +** Generate a human-readable explanation of an id-list.
132225 +** Generate a human-readable explanation of a list of Upsert objects
132255 +** Generate a human-readable diagram of the data structure that go
132311 +** Generate a human-readable diagram of the data structure that go
132381 +** Generate a human-readable diagram of the data structure that go
132459 +** Show a human-readable graph of a TriggerStep
132482 +** Show a human-readable graph of a Trigger
132510 +** These simplified versions of the tree-view routines omit unnecessary
132567 ** If it is not NULL, string zFormat specifies the format of the
132568 -** error string in the style of the printf functions: The following
132575 -** %S Insert the first element of a SrcList
132594 -** %S Insert the first element of a SrcList
132638 -** Note that this routine is only used when one or more of various
132652 - ** possible to this routine is 310, resulting in a maximum x of 31 */
132921 + /* 135 */ "Rowid" OpHelp("r[P2]=PX rowid of P1"),
132985 u16 mask; /* Mask of locks to take or release */
133035 -** If the last component of the pathname in z[0]..z[j-1] is something
133053 + int nSymlink; /* Number of symlinks resolved */
133055 + int nOut; /* Bytes of space available to zOut[] */
133056 + int nUsed; /* Bytes of zOut[] currently being used */
133066 -** Remove all instances of /./
133067 -** Remove all isntances of /X/../ for any X
133073 - int nOut /* Allocated size of buffer zOut */
133077 + int nName /* Number of significant bytes in zName */
133110 - ** of a pathname is allowed since this is important on windows. */
133142 - ** previous term of the directory if it is something other than "..".
133200 int nOut, /* Size of output buffer in bytes */
133208 - int nLink = 0; /* Number of symbolic links followed so far */
133209 - const char *zIn = zPath; /* Input path for each iteration of loop */
133302 ** Interfaces for opening a shared library, finding entry points
133310 u16 mask; /* Mask of locks to take or release */
133322 Pgno mxPgno; /* Maximum allowed size of the database */
133324 i64 pageSize; /* Number of bytes in a page */
133326 char *zFilename; /* Name of the database file */
133334 ** + 4 bytes: N (length of super-journal name in bytes, no nul-terminator).
133337 /* Write the super-journal data to the end of the journal file. If
133380 /* Copy original pages out of the journal and back into the
133436 /* In this case the pcache already contains an initialized copy of
133515 int *pnCkpt /* OUT: Final number of checkpointed frames */
133554 u8 *apOvfl[4]; /* Pointers to the body of overflow cells */
133555 BtShared *pBt; /* Pointer to BtShared that this page is part of */
133556 u8 *aData; /* Pointer to disk image of the page data */
133557 - u8 *aDataEnd; /* One byte past the end of usable data */
133558 + u8 *aDataEnd; /* One byte past the end of the entire page - not just
133572 ** These macros define the location of the pointer-map entry for a
133584 ** In this version of BtreeMoveto, pKey is a packed index record
133666 - ** past the end of the key value. */
133690 + u8 *pIter = pCell; /* For looping over bytes of pCell */
133696 + ** the (CellInfo.nSize) value found by doing a full parse of the
133697 + ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of
133714 + ** past the end of the key value. */
133747 ** The cell pCell is currently part of page pSrc but will ultimately be part
133748 -** of pPage. (pSrc and pPager are often the same.) If pCell contains a
133749 +** of pPage. (pSrc and pPage are often the same.) If pCell contains a
133750 ** pointer to an overflow page, insert an entry into the pointer-map for
133756 int iAddr = hdr + 1; /* Address of ptr to pc */
133757 - int pc = get2byte(&aData[iAddr]); /* Address of a free slot */
133759 + int pc = get2byte(pTmp); /* Address of a free slot */
133760 int x; /* Excess size of the slot */
133762 int size; /* Size of the free slot */
133764 /* EVIDENCE-OF: R-22710-53328 The third and fourth bytes of each
133765 ** freeblock form a big-endian integer which is the size of the freeblock
133780 /* This slot extends off the end of the usable part of the page */
133791 /* The next slot in the chain is not past the end of the current slot */
133793 u8 * const data = pPage->aData; /* Local cache of pPage->aData */
133794 int top; /* First byte of cell content area */
133797 int gap; /* First byte of gap between cell pointers and cell content */
133801 ** then the cell content offset of an empty page wants to be 65536.
133803 ** integer, so a value of 0 is used in its place. */
133835 /* The new freeblock is at the beginning of the cell content area,
133844 /* EVIDENCE-OF: R-07291-35328 A value of 5 (0x05) means the page is an
133879 ** number of cells on the page. */
133926 - /* One of the uses of pBt->pTmpSpace is to format cells before
133931 - ** bytes of pTmpSpace, but that the first 4 bytes are copied from
133933 - ** does cause a valgrind error when the 1 or 2 bytes of unitialized
133935 - ** zero the first 4 bytes of temp space here.
133937 - ** Also: Provide four bytes of initialized space before the
133938 - ** beginning of pTmpSpace as an area available to prepend the
133939 - ** left-child pointer to the beginning of a cell.
133959 + /* One of the uses of pBt->pTmpSpace is to format cells before
133964 + ** bytes of pTmpSpace, but that the first 4 bytes are copied from
133966 + ** does cause a valgrind error when the 1 or 2 bytes of unitialized
133968 + ** zero the first 4 bytes of temp space here.
133970 + ** Also: Provide four bytes of initialized space before the
133971 + ** beginning of pTmpSpace as an area available to prepend the
133972 + ** left-child pointer to the beginning of a cell.
134114 +** of the cell at pCur[idx] and pIdxKey.
134116 +** This routine is part of an optimization. It is always safe to return
134127 + int nCell; /* Size of the pCell cell in bytes */
134132 + /* This branch runs if the record-size field of the cell is a
134154 +** page of a table.
134166 /* Move the cursor so that it points to an entry in an index table
134174 + /* Check to see if we can skip a lot of work. Two cases:
134180 + ** (2) If the cursor is on the last page of the table and the first
134231 ** be the right kind (index or table) of b-tree page. Otherwise
134241 int nCell; /* Size of the pCell cell in bytes */
134262 int hdr; /* Beginning of the header. 0 most pages. 100 page 1 */
134304 /* Add cells to the start of the page */
134331 + ** (2) The amount of free space on the page is less than 2/3rds of
134346 BtCursor *pCur, /* Insert data into the table of this cursor */
134347 const BtreePayload *pX, /* Content of the row to be inserted */
134349 - int seekResult /* Result of prior MovetoUnpacked() call */
134350 + int seekResult /* Result of prior IndexMoveto() call */
134373 - ** blob of associated data. */
134376 /* Save the positions of any other cursors open on this table.
134403 + ** blob of associated data. */
134429 loc==0 ? "overwrite" : "new entry"));
134436 u32 nRem; /* Bytes of data still to copy */
134455 - int iCellIdx; /* Index of cell to delete */
134456 - int iCellDepth; /* Depth of node containing pCell */
134457 - CellInfo info; /* Size of the cell being deleted */
134463 + int iCellIdx; /* Index of cell to delete */
134464 + int iCellDepth; /* Depth of node containing pCell */
134465 + CellInfo info; /* Size of the cell being deleted */
134511 ** will be left in CURSOR_SKIPNEXT state pointing to the entry immediately
134512 - ** before or after the deleted entry. In this case set bSkipnext to true. */
134513 + ** before or after the deleted entry.
134529 /* A b-tree rebalance will be required after deleting this entry.
134547 + /* Optimization: If the free space is less than 2/3rds of the page,
134656 ** If the double is out of range of a 64-bit signed integer then
134682 ** is required to store the string, then value of pMem is unchanged. In
134688 +** If n is negative, then the string consists of all bytes up to but
134740 /* The following block sets the new values of Mem.z and Mem.xDel. It
134911 - /* The code generator never codes any of these opcodes as a jump
134920 - /* The code generator never codes any of these opcodes as a jump
134946 +** Check to see if a subroutine contains a jump to a location outside of
134950 +** The subroutine consists of opcodes between iFirst and iLast. Jumps to
134952 +** that contains the return address. Jumps to outside the range of iFirst
134960 +** This routine only runs during debug builds. The purpose is (of course)
134961 +** to detect invalid escapes out of a subroutine. The OP_Halt opcode
134967 + int iFirst, /* First opcode of the subroutine */
134968 + int iLast, /* Last opcode of the subroutine */
135029 ** Return the address of the next instruction to be inserted.
135074 u32 mask, /* Mask of registers to NOT release */
135138 ** Initialize an array of N Mem element.
135149 +** All other fields of Mem can safely remain uninitialized for now. They
135173 -** Release an array of N Mem elements
135174 +** Release auxiliary memory held in an array of N Mem elements.
135225 - sqlite3_int64 nByte /* Bytes of memory needed */
135226 + sqlite3_int64 nByte /* Bytes of memory needed. */
135265 ** of the prepared statement.
135267 - n = ROUND8(sizeof(Op)*p->nOp); /* Bytes of opcode memory used */
135268 + n = ROUND8P(sizeof(Op)*p->nOp); /* Bytes of opcode memory used */
135271 x.nFree = ROUNDDOWN8(pParse->szOpAlloc - n); /* Bytes of unused memory */
135383 ** To look at it another way, this routine resets the state of the
135435 ** VdbeDelete() also unlinks the Vdbe from the list of VMs associated with
135551 +** sqlite3VdbeSerialPut() <--- in-lined into OP_MakeRecord as of 2022-04-02
135586 -** Return the number of bytes written.
135588 -** nBuf is the amount of space left in buf[]. The caller is responsible
135590 -** of the pMem->u.nZero bytes for a MEM_Zero value.
135592 -** Return the number of bytes actually written into buf[]. The number
135593 -** of bytes in the zero-filled tail is included in the return value only
135632 /* Input "x" is a sequence of unsigned characters that represent a
135638 -** and store the result in pMem. Return the number of bytes read.
135643 ** routine so that in most cases the overhead of moving the stack pointer
135756 int nByte; /* Number of bytes required for *p */
135893 /* The index entry must begin with a header size */
135902 /* Fetch the integer off the end of the index record */
135947 u8 enc, /* Encoding of z. 0 for BLOBs */
136013 - ** be called automatically instead of throwing the SQLITE_MISUSE error.
136022 - ** legacy behavior of returning SQLITE_MISUSE for cases where the
136124 + ** be called automatically instead of throwing the SQLITE_MISUSE error.
136133 + ** legacy behavior of returning SQLITE_MISUSE for cases where the
136196 +** Implementation of sqlite3_vtab_in_first() (if bNext==0) and
136220 + u32 sz; /* Size of current row in bytes */
136221 + Mem sMem; /* Raw content of current row */
136261 ** is requested more than once within the same run of a single prepared
136324 int iCur, /* Index of the new VdbeCursor */
136325 int nField, /* Number of fields in the table or index */
136327 u8 eCurType /* Type of the new cursor */
136329 /* Find the memory cell that will be used to store the blob of memory
136387 ** Return the symbolic name for the data type of a pMem
136502 +** Mark the beginning of a subroutine that can be entered in-line
136513 +** the OP_Return opcode has a P3 value of 1). Thus if the subroutine is
136535 ** P4 points to a blob of data P1 bytes long. Store this
136561 ** Make a copy of registers P1..P1+P3 into registers P2..P2+P3.
136563 +** If the 0x0002 bit of P5 is set then also clear the MEM_Subtype flag in the
136564 +** destination. The 0x0001 bit of P5 indicates that this Copy opcode cannot
136568 ** This instruction makes a deep copy of the value. A duplicate
136569 ** is made of any string or blob constant. See also OP_SCopy.
136596 -** This opcode is a variant of OP_ResultRow that checks the foreign key
136601 +** to returning results such as a row change count or the result of a
136629 - /* Make sure the results of the current row are \000 terminated
136645 - ** APIs might have caused type conversions of made other changes to
136658 + ** APIs might have caused type conversions of made other changes to
136699 /* Common case of comparison of two integers */
136756 ** The first integer in the P4 integer array is the length of the array
136757 ** and does not become part of the permutation.
136822 u32 *aOffset; /* aOffset[i] is offset to start of data for i-th column */
136823 int len; /* The length of the serialized data for the column */
136858 /* For the special case of as pseudo-cursor, the seekResult field
136912 ** need to cover the header of the record. If pC->aRow does not contain
136923 /* Make sure at least the first p2+1 entries of the header have been
136977 Mem *pLast; /* Last field of the record */
136978 int nField; /* Number of fields in the record */
136981 u32 len; /* Length of a field */
136982 u8 *zHdr; /* Where to write next byte of the header */
136983 u8 *zPayload; /* Where to write next byte of the payload */
137081 ** Store the number of entries (an integer value) in the table or index
137282 + /* Key values in an array of registers */
137314 - /* For the OP_NoConflict opcode, take the jump if any of the
137351 + /* For the OP_NoConflict opcode, take the jump if any of the
137373 +** Synopsis: r[P2]=PX rowid of P1
137375 ** Store in register P2 an integer which is the key of the table entry that
137392 + /* If the cursor is not already open, create a special kind of
137417 -** P4 is always of type P4_ADVANCE. The function pointer points to
137434 -** P4 is always of type P4_ADVANCE. The function pointer points to
137519 /* End of inlined sqlite3VdbeIdxKeyCompare() */
137559 +** sqlite3_vtab_in_next() to extract all of the values stored in the P1
137627 - /* Copy the result of the function into register P3 */
137800 ** atomic-write optimization. In this case the first 28 bytes of the
137801 ** journal file may be written as part of committing the transaction. */
137865 - ** sqlite3DbFree(db, pDup) on the last line of this block, so be sure to
137866 - ** make a copy of the token before doing the sqlite3DbFree().
137946 ** Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up
137947 ** that name in the set of source tables in pSrcList and make the pExpr
137950 Schema *pSchema = 0; /* Schema of the expression */
137954 Column *pCol; /* A column of pTab */
137971 + ** parenthesized subset of the FROM clause terms. Example:
138045 - ** is for the right-hand table of a NATURAL JOIN or is in a
138194 const char *zMsg, /* Type of error */
138235 int wrong_num_args = 0; /* True if wrong number of arguments */
138237 - int nId; /* Number of characters in function name */
138302 - sqlite3ErrorMsg(pParse, "misuse of %s function %.*s()",zType,nId,zId);
138303 + sqlite3ErrorMsg(pParse, "misuse of %s function %#T()",zType,pExpr);
138309 - sqlite3ErrorMsg(pParse,"misuse of aggregate function %.*s()",nId,zId);
138310 + sqlite3ErrorMsg(pParse,"misuse of aggregate function %#T()",pExpr);
138322 - sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()",
138324 + sqlite3ErrorMsg(pParse,"wrong number of arguments to function %#T()",
138383 int i, /* The index (1-based) of the term out of range */
138384 - int mx /* Largest permissible value of i */
138385 + int mx, /* Largest permissible value of i */
138389 "%r %s BY term out of range - should be "
138448 ** order-by term to a copy of the result-set expression */
138472 /* If the number of references to the outer context changed when
138510 - sqlite3ErrorMsg(pParse, "unsafe use of %s()", pDef->zName);
138511 + sqlite3ErrorMsg(pParse, "unsafe use of %#T()", pExpr);
138536 +** Clear both elements of an OnOrUsing object
138610 - /* Note that because the size of the allocation for p->a[] is not
138611 - ** necessarily a power of two, sqlite3IdListAppend() may not be called
138653 /* If dequote==0, then pName->z does not point to part of a DDL
138666 /* If pWalker->eCode is 2 then any term of the expression that comes from
138667 - ** the ON or USING clauses of a left join disqualifies the expression
138668 + ** the ON or USING clauses of an outer join disqualifies the expression
138691 +** (3) pSrc cannot be part of the left operand for a RIGHT JOIN.
138694 +** (4) If pSrc is the right operand of a LEFT JOIN, then...
138698 +** (5) If pSrc is not the right operand of a LEFT JOIN or the left
138699 +** operand of a RIGHT JOIN, then pExpr must be from the WHERE
138719 ** all members of the RHS set, skipping duplicates.
138721 ** A cursor is opened on the b-tree object that is the RHS of the IN operator
138722 -** and pX->iTable is set to the index of that cursor.
138723 +** and the *piTab parameter is set to the index of that cursor.
138725 ** The returned value of this function indicates the b-tree type, as follows:
138728 ** If the RHS of the IN operator is a list or a more complex subquery, then
138730 ** pX->iTable made to point to the ephemeral table instead of an
138732 +** existing table. In this case, the creation and initialization of the
138733 +** ephmeral table might be put inside of a subroutine, the EP_Subrtn flag
138737 ** The inFlags parameter must contain, at a minimum, one of the bits
138741 Select *p; /* SELECT to the right of IN operator */
138742 int eType = 0; /* Type of RHS table. IN_INDEX_* */
138743 - int iTab = pParse->nTab++; /* Cursor of the RHS table */
138744 + int iTab; /* Cursor of the RHS table */
138752 /* If the RHS of this IN(...) operator is a SELECT, and if it matters
138768 + pParse->nTab--; /* Back out the allocation of the unused cursor */
138822 /* The evaluation of the EXISTS/SELECT must be repeated every time it
138823 ** is encountered if any of the following is true:
138904 ** of the first argument.
138909 - sqlite3ErrorMsg(pParse, "misuse of aggregate: %s()", pExpr->u.zToken);
138910 + sqlite3ErrorMsg(pParse, "misuse of aggregate: %#T()", pExpr);
139028 ** for clarity, but we are out of bits in the Expr.flags field so we
139058 -** Terms of p that are marked with EP_FromJoin (and hence that come from
139059 -** the ON or USING clauses of LEFT JOINS) are excluded from the analysis.
139060 +** Terms of p that are marked with EP_OuterON (and hence that come from
139061 +** the ON or USING clauses of OUTER JOINS) are excluded from the analysis.
139278 ** 1. type: Type of object ("table", "view" etc.)
139332 -** The implementation of an SQL scalar function that rewrites DDL statements
139377 ** 5: "when" part of error message.
139438 ** If D is the count of distinct values and K is the total number of
139449 sqlite3_str sStat; /* Text of the constructed "stat" line */
139504 /* Begin by generating some termination code at the end of the
139557 /* A minimum of one cursor is required if autoincrement is used
139618 int addrInsLoop; /* Top of the loop for inserting rows */
139631 Select *pSel; /* Copy of the SELECT that implements the view */
139632 int nErr = 0; /* Number of errors encountered */
139633 - int n; /* Temporarily holds the number of cursors assigned */
139688 sqlite3ErrorMsg(pParse, "unsupported use of NULLS %s",
139722 /* Add an entry in sqlite_schema for this index
139819 Token *pDatabase, /* Name of the database containing pTable */
139820 Token *pAlias, /* The right-hand side of the AS subexpression */
139821 Select *pSubquery, /* A subquery used in place of a table name */
139822 - Expr *pOn, /* The ON clause of a join */
139823 - IdList *pUsing /* The USING clause of a join */
139885 +** * All tables to the left of the right-most RIGHT JOIN are tagged with
139887 +** code generator can easily tell that the table is part of
139888 +** the left operand of at least one RIGHT JOIN.
139906 + /* All terms to the left of a RIGHT JOIN should be tagged with the
139931 +/* Generate byte-code that will report the number of rows modified
139943 ** A table is read-only if any of the following are true:
139969 ** put in an SrcList structure because some of the subroutines we
139988 ** ONEPASS_MULTI: One-pass approach - any number of rows may be deleted.
140012 +** Return the subtype of X
140024 ** Implementation of the length() function
140029 -** Implementation of the printf() function.
140030 +** Implementation of the printf() (a.k.a. format()) SQL function.
140038 -** Implementation of the QUOTE() function. This function takes a single
140043 +** Append to pStr text that is the SQL literal representation of the
140146 +** Implementation of the QUOTE() function.
140148 +** The quote(X) function returns the text of an SQL literal which is the
140149 +** value of its argument suitable for inclusion into an SQL statement.
140172 ** for the first character of the input string.
140269 +** Clear the apTrigger[] cache of CASCADE triggers for all foreign keys
140439 /* If currently processing the PRIMARY KEY of a WITHOUT ROWID
140445 ** of the matched index row are different from the original PRIMARY
140459 - return 0; /* Must be of the form INSERT INTO ... SELECT ... */
140592 + sqlite3ErrorMsg(db->pParse, "out of memory");
140604 int addrTop; /* Top of a loop checking foreign keys */
140698 + if( db->mallocFailed ) sqlite3ErrorMsg(pParse, "out of memory");
140702 +** Maximum number of times that we will try again to prepare a statement
140714 const char **pzTail /* OUT: End of parsed string */
140731 + if( db->mallocFailed ) sqlite3ErrorMsg(&sParse, "out of memory");
140734 /* For a long-term use prepared statement avoid the use of
140812 u8 eTnctType; /* One of the WHERE_DISTINCT_* operators */
140814 int addrTnct; /* Address of OP_OpenEphemeral opcode for tabTnct */
140842 +** of other non-standard and in many cases non-sensical join types.
140844 +** type and returns a result. Examples of accepted nonsense join types
140863 +** * If "OUTER" is present then there must also be one of
140869 u8 nChar; /* Length of the keyword in characters */
140943 ** of the matching column and return TRUE.
140947 SrcList *pSrc, /* Array of tables to search */
140948 - int N, /* Number of tables in pSrc->a[] to search */
140949 + int iStart, /* First member of pSrc->a[] to check */
140950 + int iEnd, /* Last member of pSrc->a[] to check */
140951 const char *zCol, /* Name of the column we are looking for */
140952 int *piTab, /* Write index of pSrc->a[] here */
140953 int *piCol, /* Write index of pSrc->a[*piTab].pTab->aCol[] here */
140958 int iCol; /* Index of column matching zCol */
140980 -** WHERE clause expression of a SELECT statement. The new term, which
140981 -** is ANDed with the existing WHERE clause, is of the form:
140986 -** (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is
140987 -** column iColRight of tab2.
140991 - SrcList *pSrc, /* List of tables in FROM clause */
140992 - int iLeft, /* Index of first table to join in pSrc */
140993 - int iColLeft, /* Index of column in first table */
140994 - int iRight, /* Index of second table in pSrc */
140995 - int iColRight, /* Index of column in second table */
141026 -** Set the EP_FromJoin property on all terms of the given expression.
141028 +** Set the EP_OuterON property on all terms of the given expression.
141032 -** The EP_FromJoin property is used on terms of an expression to tell
141033 -** the LEFT OUTER JOIN processing logic that this term is part of the
141034 +** The EP_OuterON property is used on terms of an expression to tell
141035 +** the OUTER JOIN processing logic that this term is part of the
141037 ** of the more general WHERE clause. These terms are moved over to the
141078 -/* Undo the work of sqlite3SetJoinExpr(). In the expression p, convert every
141081 +/* Undo the work of sqlite3SetJoinExpr(). This is used when a LEFT JOIN
141083 +** "pushed down" into the WHERE clause of a subquery.
141092 +** if the table that p references is on the left side of a RIGHT JOIN.
141128 -** ON and USING clauses are converted into extra terms of the WHERE clause.
141140 ** The terms of a FROM clause are contained in the Select.pSrc structure.
141141 ** The left most table is the first entry in Select.pSrc. The right-most
141142 ** table is the last entry. The join operator is held in the entry to
141143 -** the left. Thus entry 0 contains the join operator for the join between
141144 +** the right. Thus entry 1 contains the join operator for the join between
141146 -** also attached to the left entry.
141147 +** also attached to the right entry.
141149 ** This routine returns the number of errors encountered.
141181 char *zName; /* Name of column in the right table */
141209 - /* Add the ON clause to the end of the WHERE clause, connected by
141236 char *zName; /* Name of the term in the USING clause */
141238 int iLeftCol; /* Column number of matching column on the left */
141239 int iRightCol; /* Column number of matching column on the right */
141240 + Expr *pE1; /* Reference to the column on the LEFT of the join */
141241 + Expr *pE2; /* Reference to the column on the RIGHT of the join */
141261 + ** JOINs. If only a single table on the left side of this join
141264 + ** of the join, construct a coalesce() function that gathers all
141265 + ** such tables. Raise an error if more than one of those references
141269 + ** non-USING references to zName on the left of an INNER or LEFT
141270 + ** JOIN. But older versions of SQLite do not do that, so we avoid
141307 + /* Add the ON clause to the end of the WHERE clause, connected by
141433 /* Use the original text of the column expression as its name */
141474 ** The "LIMIT of exactly 1" case of condition (1) comes about when a VALUES
141487 + int nSelect; /* Number of SELECT statements in the compound */
141510 /* Allocate a range of temporary registers and the KeyInfo needed
141574 +** target slot in the parent is the right operand of a LEFT JOIN, or one of
141575 +** the left operands of a RIGHT JOIN. In either case, we need to potentially
141593 +** When the subquery on the right side of the LEFT JOIN is flattened, we
141594 +** have to add OP_IfNullRow in front of the OP_Integer that implements the
141595 +** "m" value of the subquery so that a NULL will be loaded instead of 59
141596 +** when processing a non-matched row of the left.
141654 ** just as it did when it was a column of a view or sub-query. */
141677 ** (17f) the subquery must not be the RHS of a LEFT JOIN.
141678 +** (17g) either the subquery is the first element of the outer
141680 +** of the subquery. (This is a duplicate of condition (27b).)
141688 +** (26) The subquery may not be the right operand of a RIGHT JOIN.
141692 +** is the first element of the parent query. This must be the
141696 +** in any arm of the compound query. (See also (17g).)
141700 +** (29) Either the subquery is not the right-hand operand of a join with an
141701 +** ON or USING clause nor the right-hand operand of a NATURAL JOIN, or
141702 +** the right-most table within the FROM clause of the subquery
141703 +** is not part of an outer join.
141709 SrcList *pSubSrc; /* The FROM clause of the subquery */
141710 int iParent; /* VDBE cursor number of the pSub result set temp table */
141712 - int isLeftJoin = 0; /* True if pSub is the right side of a LEFT JOIN */
141713 + int isOuterJoin = 0; /* True if pSub is the right side of a LEFT JOIN */
141760 + ** We do not want two constraints on the same term of the flattened
141762 + ** To prevent this, one or the other of the following conditions must be
141765 + ** (29a) The right-most entry in the FROM clause of the subquery
141766 + ** must not be part of an outer join.
141768 + ** (29b) The subquery itself must not be the right operand of a
141788 ** use only the UNION ALL operator. And none of the simple select queries
141805 + ** omitted on left-hand tables of the right join that is being
141835 pSubSrc = pSub->pSrc; /* FROM clause of subquery */
141836 nSubSrc = pSubSrc->nSrc; /* Number of terms in subquery FROM clause */
141891 int nChng; /* Number of times a constant is propagated */
141936 + /* Do not propagate constants through the ON clause of a LEFT JOIN */
141945 Expr *pWhere, /* The WHERE clause of the outer query */
141946 - int iCursor, /* Cursor number of the subquery */
141947 - int isLeftJoin /* True if pSubq is the right term of a LEFT JOIN */
141948 + SrcItem *pSrc /* The subquery term of the outer FROM clause */
142041 +** Check the N SrcItem objects to the right of pBase. (N might be zero!)
142042 +** If any of those SrcItem objects have a USING clause containing zName
142045 +** If N is zero, or none of the N SrcItem objects to the right of pBase
142046 +** contains a USING clause, or if none of the USING clauses contain zName,
142070 /* Process NATURAL keywords, and ON and USING clauses of joins.
142098 + ExprList *pNestedFrom; /* Result-set of a nested FROM clause */
142181 - ** table to the right of the join */
142322 SELECTTRACE(0x400,pParse,p,("After count-of-view optimization:\n"));
142330 +** If any term of pSrc, or any SF_NestedFrom sub-query, is not the same
142383 /* All of these destinations are also able to ignore the ORDER BY clause */
142448 /* Convert LEFT JOIN into JOIN if there are terms of the right table
142449 ** of the LEFT JOIN used in the WHERE clause.
142465 /* No futher action if this term of the FROM clause is no a subquery */
142529 + ** The subquery is implemented as a co-routine if all of the following are
142538 + ** (3) the subquery is not part of a left operand for a RIGHT JOIN
142548 /* Implement a co-routine that will return a single row of the result
142562 /* If the subquery is not correlated and if we are not inside of
142563 ** a trigger, then we only need to compute the value of the subquery
142589 ** original setting of the SF_Distinct flag, not the current setting */
142629 ** ORDER BY to maximize the chances of rows being delivered in an
142714 Trigger *pList; /* List of triggers to return */
142749 Token *pTableName, /* Name of the table to be updated */
142752 ExprList *pEList, /* The SET clause: list of column and new values */
142769 ** Return a list of all triggers on table pTab if there exists at least
142770 ** one trigger that must be fired when an operation of type 'op' is
142772 ** least one of the columns in pChanges is being modified.
142778 int op, /* one of TK_DELETE, TK_INSERT, TK_UPDATE */
142786 + int op, /* one of TK_DELETE, TK_INSERT, TK_UPDATE */
142788 + int *pMask /* OUT: Mask of TRIGGER_BEFORE|TRIGGER_AFTER */
142950 /* Insert an OP_Halt at the end of the sub-program. */
143002 /* Code the OP_Program opcode in the parent VDBE. P4 of the OP_Program
143029 /* If there was a FROM clause, set nChangeFrom to the number of expressions
143031 ** clause if this function is being called to generate code for part of
143145 +** This object is a header on a block of allocated memory that will be
143150 + u64 sz; /* Bytes of space */
143172 u8 iFrom; /* Which entry in the FROM clause */
143173 u8 op, p3, p5; /* Opcode, P3 & P5 of the opcode that ends the loop */
143174 int p1, p2; /* Operands of the opcode used to end the loop */
143185 + u32 mHandleIn; /* Terms to handle as IN(...) instead of == */
143202 +#define TERM_SLICE 0x8000 /* One slice of a row-value/vector comparison */
143205 ** An instance of the WhereScan object is used as an iterator for locating
143214 unsigned char nEquiv; /* Number of entries in aiCur[] and aiColumn[] */
143223 int nTerm; /* Number of terms */
143224 int nSlot; /* Number of entries in a[] */
143225 + int nBase; /* Number of terms through the last non-Virtual */
143226 WhereTerm *a; /* Each a[] describes a term of the WHERE cluase */
143251 ExprList *pResultSet; /* Result set of the query */
143258 int iBreak; /* Jump here to break out of the loop */
143260 int iEndWhere; /* End of the WHERE clause itself */
143261 WhereLoop *pLoops; /* List of all WhereLoop objects */
143264 Bitmask revMask; /* Mask of ORDER BY terms that need reversing */
143265 WhereClause sWC; /* Decomposition of the WHERE clause */
143268 u32 op, /* Mask of WO_xx values describing operator */
143315 -#define WO_ALL 0x1fff /* Mask of all possible WO_* values */
143316 +#define WO_ALL 0x3fff /* Mask of all possible WO_* values */
143317 #define WO_SINGLE 0x01ff /* Mask of all non-compound WO_* values */
143321 #define WHERE_BIGNULL_SORT 0x00080000 /* Column nEq of index is BIGNULL */
143545 ** However, if the scan currently being coded is a branch of an OR-loop and
143546 -** the statement currently being coded is a SELECT, then P3 of OP_DeferredSeek
143547 -** is set to iIdxCur and P4 is set to point to an array of integers
143548 -** containing one entry for each column of the table cursor iCur is open
143549 -** on. For each table column, if the column is the i'th column of the
143550 -** index, then the corresponding array entry is set to (i+1). If the column
143551 -** does not appear in the index at all, the array entry is set to 0.
143555 +** enable this optimization, the P3 of OP_DeferredSeek is set to iIdxCur
143556 +** and P4 is set to an array of integers containing one entry for each column
143558 +** column of the index, then the corresponding array entry is set to (i+1).
143559 +** If the column does not appear in the index at all, the array entry is set
143612 + int iLevel, /* Which level of pWInfo->a[] should be coded */
143657 ** Generate code for the start of the iLevel-th loop in the WHERE clause
143661 ** row of the left table of the join.
143679 /* Special case of a FROM clause subquery implemented as a co-routine */
143743 Expr *pRight; /* RHS of the comparison */
143744 VdbeOp *pOp; /* Opcode to access the value of the IN constraint */
143750 - ** encoding of the value in the register, so it *must* be reloaded. */
143754 + ** encoding of the value in the register, so it *must* be reloaded.
143855 ** The OR-optimization doesn't work for the right hand table of
143865 /* If the original WHERE clause is z of the form: (x1 OR x2 OR ...) AND y
143873 ** is not contained in the ON clause of a LEFT JOIN.
143876 + ** 2022-02-04: Do not push down slices of a row-value comparison.
143877 + ** In other words, "w" or "y" may not be a slice of a vector. Otherwise,
143878 + ** the initialization of the right-hand operand of the vector comparison
143908 Expr *pDelete; /* Local copy of OR clause term */
143909 int jmp1 = 0; /* Address of jump operation */
143932 + /* Set the P2 operand of the OP_Return opcode that will end the current
143933 + ** loop to point to this spot, which is the top of the next containing
144009 + /* pTab is the right-hand table of the RIGHT JOIN. Generate code that
144010 + ** will record that the current row of that table has been matched at
144041 ** at least one row of the right table has matched the left table.
144055 + ** of the RIGHT JOIN. During normal operation, the subroutine will
144056 + ** be in-line with the rest of the code. But at the end, a separate
144058 + ** of pTab, with all tables to left begin set to NULL.
144068 + ** to the results of the OUTER JOIN. The following loop generates the
144178 /************** End of wherecode.c *******************************************/
144322 - ** on left table of a LEFT JOIN. Ticket #3015 */
144340 + ** on left table of a LEFT JOIN. Ticket #3015 */
144346 + /* The ON clause of an INNER JOIN references a table to its right.
144381 ** This is only required if at least one side of the comparison operation
144444 + int iReg, /* Register that will hold value of the limit/offset */
144478 +** Possibly add terms corresponding to the LIMIT and OFFSET clauses of the
144491 +** LIMIT and OFFSET terms are ignored by most of the planner code. They
144492 +** exist only so that they may be passed to the xBestIndex method of the
144493 +** single virtual table in the FROM clause of the SELECT.
144605 +** Return a Bitmask of all tables referenced by Expr. Expr can be
144615 +** Return a Bitmask of all tables referenced by every expression
144696 + u32 mIn; /* Mask of terms that are <col> IN (...) */
144703 /* Forward declaration of methods */
144821 - Bitmask notReady /* Tables in outer loops of the join */
144824 + const Bitmask notReady /* Tables in outer loops of the join */
144834 - ** the RHS of a LEFT JOIN. Such a term can only be used if it is from
144853 ** makes use of the automatic index.
144860 - Bitmask notReady, /* Mask of cursors that are not available */
144863 + const Bitmask notReady, /* Mask of cursors that are not available */
144866 int nKeyCol; /* Number of columns in the constructed index */
144873 - || pLoop->prereq!=0 ); /* table of a LEFT JOIN */
144879 + ** WHERE clause (or the ON clause of a LEFT join) that constrain which
144880 + ** rows of the target table (pSrc) that can be used. */
144939 + int addrOnce; /* Address of opening OP_Once */
144940 + int addrTop; /* Address of OP_Rewind */
144964 + ** to zero-filled blob of at least 80K bits, but maybe more if the
144965 + ** estimated size of the table is larger. We could actually
144966 + ** measure the size of the table at run-time using OP_Count with
145030 + ** not able to do early evaluation of bloom filters that make use of
145043 ** responsibility of the caller to eventually release the structure
145054 u16 *pmNoOmit /* Mask of terms not to omit */
145075 - /* Count the number of possible WHERE clause constraints referring
145078 + ** Mark each term with the TERM_OK flag. Set nTerm to the number of
145097 + ** right-hand table of a LEFT JOIN nor to the either table of a
145140 + ** of the COLLATE operator matches the collation of the column. */
145156 + /* No matches cause a break out of the loop */
145178 sqlite3ErrorMsg(pParse, "out of memory");
145207 - ** right-hand table of a LEFT JOIN. See tag-20191211-001 for the
145293 /* Do a binary search to find the first sample greater than or equal
145294 ** to pRec. If pRec contains a single field, the set of samples to search
145407 - ** be used by the right table of a LEFT JOIN. Only constraints in the
145413 + ** be used by the right table of a LEFT JOIN nor by the left table of a
145418 + ** for an example of a WHERE clause constraints that may not be used on
145419 + ** the right table of a RIGHT JOIN because the constraint implies a
145420 + ** not-NULL condition on the left table of the RIGHT JOIN.
145443 - int isLeft, /* True if iTab is the right table of a LEFT JOIN */
145445 WhereClause *pWC, /* The WHERE clause of the query */
145474 if( !pBuilder->pOrSet /* Not part of an OR optimization */
145483 + && (pSrc->fg.jointype & JT_RIGHT)==0 /* Not the right tab of a RIGHT JOIN */
145486 LogEst rLogSize; /* Logarithm of the number of rows in the table */
145504 + /* Do not do an SCAN of a index-on-expression in a RIGHT JOIN
145583 ** consume the ORDER BY clause because (1) the order of IN terms
145584 ** is not necessarily related to the order of output terms and
145593 + ** xFilter for each value on the RHS of the IN) and a LIMIT or
145613 -** returns a pointer to a buffer containing the name of the collation
145614 -** sequence associated with element iCons of the sqlite3_index_info.aConstraint
145615 -** array. Or, if iCons is out of range or there is no active xBestIndex
145660 +** on the right-hand-side of constraint iCons.
145663 + sqlite3_index_info *pIdxInfo, /* Copy of first argument to xBestIndex */
145729 ** Add all WhereLoop objects for a table of the join identified by
145860 - ** right-hand-side of a LEFT or CROSS JOIN. */
145866 + /* Add prerequisites to prevent reordering of FROM clause terms
145868 + ** prevents the right operand of a RIGHT JOIN from being swapped with
145872 + ** prevent FROM-clause terms from moving from the right side of
145873 + ** a LEFT JOIN over to the left side of that join if the LEFT JOIN
145874 + ** is itself on the left side of a RIGHT JOIN.
145968 +** 2) The table must be the RHS of a LEFT JOIN.
145970 +** must contain a constraint that limits the scan of the table to
145972 +** 4) The table must not be referenced by any part of the query apart
146005 + ** condition (1) of the header comment */
146059 +** of rows in the table that is being considered for the Bloom
146061 +** (2) Some searches are expected to find zero rows. (This is determined
146065 +** (4) The size of the table being searched is known by ANALYZE.
146067 +** This block of code merely checks to see if a Bloom filter would be
146069 +** WhereLoop. The implementation of the Bloom filter comes further
146109 ** Generate the beginning of the loop used for WHERE clause processing.
146120 /* An ORDER/GROUP BY clause of more than 63 terms cannot be optimized */
146131 /* The number of tables in the FROM clause is limited by the number of
146182 /* Analyze all of the subexpressions. */
146233 - ** 2) The table must be the RHS of a LEFT JOIN.
146235 - ** must contain a constraint that limits the scan of the table to
146237 - ** 4) The table must not be referenced by any part of the query apart
146329 if( sqlite3WhereTrace & 0x100 ){ /* Display all terms of the WHERE clause */
146330 sqlite3DebugPrintf("---- WHERE clause at end of analysis:\n");
146350 /* If we know that only a prefix of the record will be used,
146389 + /* The nature of RIGHT JOIN processing is such that it messes up
146440 +** Return true if cursor iCur is opened by instruction k of the
146441 +** bytecode. Used inside of assert() only.
146459 ** Generate the end of the WHERE loop. See comments on
146474 + /* Terminate the subroutine that forms the interior of the loop of
146520 - /* The "break" point is here, just past the end of the outer loop.
146535 + ** unmatched rows of the right operand of the RIGHT JOIN with
146536 + ** all of the columns of the left operand set to NULL.
146543 /* For a co-routine, change all OP_Column references to the table of
146544 ** the co-routine into OP_Copy of result contained in a register.
146551 - /* Close all of the cursors that were opened by sqlite3WhereBegin.
146574 ** from the index instead of from the table where possible. In some cases
146617 + /* The "break" point is here, just past the end of the outer loop.
146694 /* The inline versions of min() and max() require a single ephemeral
146806 - ** new Expr to populate pOut. Set the span of pOut to be the identifier
148270 /********** End of lemon-generated parsing tables *****************************/
149306 ** of that rule */
150114 /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
151737 /* Expressions of the form
151742 ** regardless of the value of expr1.
152662 int nErr = 0; /* Number of errors encountered */
152664 int n = 0; /* Length of the next token token */
152780 +** Return the byte offset of the most recent error
152794 ** Return UTF-16 encoded English language explanation of the most recent
152805 + ** Search at http://web.archive.org/ to find the 2015-03-16 archive
152806 + ** of the link above to see the original text.
152853 + ** If 2, then invoke xAlt() instead of localtime(). If 0, normal
152862 + ** xAlt should write results in to struct tm object of its 2nd argument
152933 +** Return the name of the N-th database schema. Return NULL if N is out
152934 +** of range.
152951 ** Return the filename of the database associated with a database
152969 + int nRef; /* Number of pointers to this object */
153090 int nPoslist = 0; /* Number of bytes in aPoslist */
153091 int iPrev = -1; /* Token number of previous deferred token */
153185 /************** End of fts3_unicode2.c ***************************************/
153204 ** a JSONB type in the future which stores a binary encoding of JSON in
153235 -** Versions of isspace(), isalnum() and isdigit() to which it is safe
153239 - /* Use the SQLite core versions if this routine is part of the
153292 -** Some of the testcase() macros in this file are problematic for gcov
153492 +** always return a JSON representation of the result. If JSON_SQL is set,
153493 +** then always return an SQL representation of the result. If neither flag
153502 +** containing the result of each PATH.
153570 + ** element of the array being the value selected by one of the PATHs */
153614 JsonNode *pResult; /* The result of the merge */
153662 -** Return the top-level "type" of a JSON string. Throw an error if
153664 +** Return the top-level "type" of a JSON string. json_type() raises an
153771 /* Append the name of the path for element i to pStr
153969 -/************** End of json1.c ***********************************************/
153970 +/************** End of json.c ************************************************/
153980 -** Versions of isspace(), isalnum() and isdigit() to which it is safe
153985 /* Use the SQLite core versions if this routine is part of the
154056 int nRead; /* Total number of blocks read */
154099 /* stmt_vtab is a subclass of sqlite3_vtab which will
154100 ** serve as the underlying representation of a stmt virtual table
154313 ** change the value of the error code. The error-code preserving
154332 +** of the start of that token. ^The byte offset returned by
154339 ** the time of the first error and the call to these interfaces.
154362 ** implementation of [application-defined SQL functions] are protected.
154373 +** which is native to the platform, regardless of the text encoding set
154383 -** The these routines may attempt to convert the datatype of the result.
154384 +** These routines may attempt to convert the datatype of the result.
154403 +** of sqlite3_value_dup(V) is a NULL value.
154416 +** for the N-th database on database connection D, or a NULL pointer of N is
154417 +** out of range. An N value of 0 means the main database file. An N of 1 is
154418 +** the "temp" schema. Larger values of N correspond to various ATTACH-ed
154429 +** private copy of the result prior to releasing the mutex.
154440 -** an operator that is part of a constraint term in the wHERE clause of
154441 +** an operator that is part of a constraint term in the WHERE clause of
154460 +** ^The left-hand operand of the operator is given by the corresponding
154461 +** aConstraint[].iColumn field. ^An iColumn of -1 indicates the left-hand
154470 +** by the [xFindFunction|xFindFunction method] of the virtual table
154486 +** tables, the collating sequence of constraints does not matter (for example
154530 ** The counter is incremented on the first [sqlite3_step()] call of each
154537 +** <dd>^SQLITE_STMTSTATUS_FILTER_HIT is the number of times that a join
154539 +** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of
154540 +** times that the Bloom filter returned a find, and thus the join step
154544 ** <dd>^This is the approximate number of bytes of heap memory
154562 -** method of a [virtual table].
154563 +** method of a [virtual table]. This function returns a pointer to a string
154564 +** that is the name of the appropriate collation sequence to use for text
154581 -** containing the name of the collation sequence for the corresponding
154587 +** a [COLLATE operator], then the name of the collation specified by
154590 +** of the constraint specifies an alternative collating sequence via
154593 +** name of that alternative collating sequence is returned.
154604 +** of a [virtual table] implementation. The result of calling this
154605 +** interface from outside of xBestIndex() is undefined and probably harmful.
154611 +** can meet the ordering requirements of the query planner, it may set
154617 +** sort order defined by the "nOrderBy" and "aOrderBy" fields of the
154620 +** the xBestIndex method to set the "orderByConsumed" flag, regardless of
154633 +** combination of values in the columns identified by the "aOrderBy" field
154649 +** ^For the purposes of comparing virtual table output values to see if the
154662 +** ordered correctly. The use of the "orderByConsumed" flag and the
154664 +** use of the sqlite3_vtab_distinct() interface and the "orderByConsumed"
154676 +** [xBestIndex|xBestIndex() method] of a [virtual table] implementation.
154677 +** The result of invoking this interface from any other context is
154680 +** ^(A constraint on a virtual table of the form
154686 +** the usual mode of handling IN operators, SQLite generates [bytecode]
154688 +** on the right-hand side of the IN operator.)^ Thus the virtual table
154689 +** only sees a single value from the right-hand side of the IN operator
154693 +** table to see all values on the right-hand of the IN operator all at
154703 +** of the IN operator is even possible.
154723 +** ^(All-at-once processing of the IN operator is selected if both of the
154735 +** ^If either or both of the conditions above are false, then SQLite uses
154740 +** [sqlite3_vtab_in_next()] to find all values on the right-hand side
154741 +** of the IN constraint.
154746 +** CAPI3REF: Find all elements on the right-hand side of an IN constraint.
154749 +** [xFilter|xFilter() method] of a [virtual table] implementation.
154750 +** The result of invoking these interfaces from any other context
154754 +** sqlite3_vtab_in_next(X,P) must be one of the parameters to the
154764 +** of the IN constraint using code like the following:
154780 +** on the RHS of the IN constraint. ^If there are no more values on the
154781 +** right hand side of the IN constraint, then *P is set to NULL and these
154783 +** some other value, such as SQLITE_NOMEM, in the event of a malfunction.
154786 +** next call to either of these routines or until the end of the xFilter
154799 +** of a [virtual table] implementation. The result of calling this interface
154800 +** from outside of an xBestIndex method are undefined and probably harmful.
154803 +** the [xBestIndex] method of a [virtual table] implementation, with P being
154804 +** a copy of the [sqlite3_index_info] object pointer passed into xBestIndex and
154806 +** attempts to set *V to the value of the right-hand operand of
154811 +** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th
154817 +** the right-hand operand of a constraint is a literal value in the original
154827 +** and remains valid for the duration of the xBestIndex method call.
154831 +** The "_rhs_" in the name of this routine is an abbreviation for
154920 # Identity of this package.
154949 -\`configure' configures sqlite 3.37.1 to adapt to many kinds of systems.
154950 +\`configure' configures sqlite 3.39.2 to adapt to many kinds of systems.
154958 - short | recursive ) echo "Configuration of sqlite 3.37.1:";;
154959 + short | recursive ) echo "Configuration of sqlite 3.39.2:";;
154965 Disable loading of external extensions
155048 # report actual input values of CONFIG_FILES etc. instead of their
155155 + a lot of legacy code.
155159 +of those systems. In MySQL and PG, the result type a function or operator
155160 +may only depend on the type of its arguments, never the value of its arguments.
155161 +But the underlying JSON type depends on the value of the JSON path
155162 +expression, not the type of the JSON path expression (which is always TEXT).
155163 +Hence, the result type of ->> in MySQL and PG is unable to vary according
155164 +to the type of the JSON value being extracted.
155167 +to return different datatypes depending on the value of their arguments.
155169 +depending on the JSON type of the value being extracted. This means that
155170 +the behavior of the ->> is slightly different in SQLite versus MySQL and PG
155174 +but I have been unable to think of any situations where returning the
155201 + case of SQLite, INTEGER or REAL.
155213 + whereas the other systems return a text representation of the numeric
155227 +But because SQLite supports the union of the disjoint capabilities of
155229 +SQLite that do not work in one of MySQL and PG. This is an unavoidable
155230 +consequence of the different syntax for -> and ->> in MySQL and PG.
155374 /* Copy the entire schema of database [db] into [dbm]. */
155486 +# from emacs. It is not part of the canonical build process.
155500 +# Note that the target "should probably" contain a symlink of
155528 + The author disclaims copyright to this source code. In place of a
155532 + * May you find forgiveness for yourself and forgive others.
155556 + /** Running total of the number of tests run via
155582 + /** Identical to assert() but throws instead of calling
155708 + The author disclaims copyright to this source code. In place of a
155712 + * May you find forgiveness for yourself and forgive others.
155722 + subject to any number of changes as experience reveals what those
155726 + arbitrary number of discrete event listeners like with DOM elements,
155735 + The 'type' values expected by each side of the main/worker
155742 + layer. The data property is the string of the output, noting
155760 + the module loading is complete, a message with a text value of
155777 + message instead of doing actual work, as the underlying db cannot
155827 + /** Returns the name of the currently-opened db. */
155883 + /** Triggers the export of the current db. Fires an
155888 + filename: name of db,
155889 + buffer: contents of the db file (Uint8Array),
155960 + and fires worker events with a type of 'status' and a
155961 + payload of:
155964 + text: string | null, // null at end of load process
155968 + We have no way of knowing in advance how many steps will
155971 + current value of message.step and max value of message.step+1,
155974 + When work is finished, a message with a text value of null is
156158 + span.labeled-input {
156167 + span.labeled-input > *:nth-child(2) {
156189 + <span>SQLite3 Fiddle</span>
156190 + <span class='powered-by'>Powered by
156191 + <a href='https://sqlite.org'>SQLite3</a></span>
156217 + <span class='labeled-input'>
156223 + </span>
156224 + <span class='labeled-input'>
156230 + </span>
156231 + <span class='labeled-input'>
156235 + </span>
156236 + <span class='labeled-input'>
156240 + </span>
156241 + <span class='labeled-input'>
156244 + </span>
156245 + <span class='labeled-input'>
156247 + </span>
156248 + <span class='labeled-input'>
156250 + </span>
156266 +-- If a subset of the text is currently selected,
156304 + The author disclaims copyright to this source code. In place of a
156308 + * May you find forgiveness for yourself and forgive others.
156313 + This is the main entry point for the sqlite3 fiddle app. It sets up the
156332 + of those are available.
156377 + With this in place we can justify using localStorage instead of
156380 + One implication of using localStorage and sessionStorage is that
156392 + properties in the topmost level of the storage object. We do that
156393 + because adding a layer of object to sandbox each app would mean
156395 + e.g. instead of storageObject.projectName.foo we have
156397 + efficiency's sake (in terms of battery life and
156432 + /** Returns true if the given key has a value of "true". If the
156433 + key is not found, it returns true if the boolean value of dflt
156439 + /** Returns the JSON.parse()'d value of the given
156462 + /** Returns an array of all keys currently in the storage. */
156486 + "transient": "Transient storage local to this invocation of this page."
156494 + /** Name of the stored copy of SqliteFiddle.config. */
156499 + app-level object for the main-thread side of the sqlite
156520 + /* If true, swap positions of the input/output areas. */
156528 + of the arguments array (this is to facilitate receiving
156529 + lists of arguments via worker events).
156563 + /** Adds a worker message handler for messages of the given
156826 + /** Initiate a download of the db. */
156842 + want to be reading (from outside of sqlite) the
156877 + Handle load/import of an external db file.
156888 + SF.echo("Loading progress:",ev.loaded,"of",ev.total,"bytes.");
156905 + SF.echo("Cancelled loading of",f.name+".");
156921 + height", which is the bounding top/bottom range of this element
156922 + and all of its children, recursively. For some DOM structure
156923 + cases, a parent may have a reported height of 0 even though
156965 + Source: underscore.js, by way of https://davidwalsh.name/javascript-debounce-function
156985 + /* Workaround for Safari mayhem regarding use of vh CSS
157021 + /** Set up a selection list of examples */
157029 +-- If a subset of the text is currently selected,
157102 + 'supported deliverable of the sqlite project. It is subject to',
157103 + 'any number of changes or outright removal at any time.\n');
157118 +build of the sqlite3 shell app into an HTML page, effectively running
157152 +top of the sqlite3 build tree:
157219 + The author disclaims copyright to this source code. In place of a
157223 + * May you find forgiveness for yourself and forgive others.
157240 + api: bindings for much of the core sqlite3 APIs,
157256 + Because using certain parts of the low-level API properly requires
157257 + some degree of WASM-related magic, it is not recommended that that
157259 + use the higher-level OO API or write a custom wrapper on top of the
157260 + lower-level API. In short, most of the C-style API is used in an
157268 + # Goals and Non-goals of this API
157277 + top of that, designed to run in the same thread (main window or
157280 + is one of those and this wrapper is in the other. That
157282 + can be interacted with, but keeping the DB operations out of the
157286 + filesystem APIs. As of this writing, such things are still very
157291 + - As WASM is a web-centric technology and UTF-8 is the King of
157307 + it solves much of the wasm-related voodoo, but we'll need a
157310 + thread. Regardless of those differences, it makes a great point
157311 + of reference:
157315 + Some of the specific design goals here:
157318 + in terms of usage.
157344 + Attribution: though not a direct copy/paste, much of what
157350 + C API, e.g., in the form of a JSON object, but getting that
157355 + proverbial level of indirection, calling in to C to get it,
157368 + /* Minimum subset of sqlite result codes we'll need. */
157387 + [/* C-side functions to bind. Each entry is an array with 3 or 4
157440 + the SQL string, instead of being converted to a
157467 + binding of the sqlite3 API which is designed to be run within
157494 + If the filename is provided, only the last component of the
157498 + the one used for accessing the db file within root directory of
157504 + only export images of DBs which are stored in the
157508 + find a way to export those as well). The naming semantics will
157536 + toss("Expecting Uint8Array image of db contents.");
157544 + this._statements = {/*map of open Stmt _pointers_ to Stmt*/};
157545 + this._udfs = {/*map of UDF names to wasm function _pointers_*/};
157576 + this._allocs = [/*list of alloc'd memory blocks for bind() values*/]
157600 + and returns the callback argument of the type indicated by
157659 + this.filename entry in the pseudo-filesystem will also be
157687 + special names like ":memory:". Not of much use until
157690 + the filename of the ATTACHEd db with that name, else it assumes
157691 + a name of `main`.
157711 + This function works like execMulti(), and takes most of the
157723 + - .resultRows: if this is an array, each row of the result
157727 + or 'object', neither of which is the default. It is legal
157735 + (regardless of whether the query produces any result
157757 + "be one of 'array' or 'object'.");
157789 + Executes one or more SQL statements in the form of a single
157799 + The optional options object may contain any of the following
157810 + - .callback = a function which gets called for each row of
157818 + - .rowMode = a string describing what type of argument
157820 + value of 'object' causes the results of `stmt.get({})` to
157821 + be passed to the object. A value of 'array' causes the
157822 + results of `stmt.get([])` to be passed to the callback.
157823 + A value of 'stmt' is equivalent to the default, passing
157828 + - saveSql = an optional array. If set, the SQL of each
157834 + See also the exec() method, which is a close cousin of this
157838 + object. Calling any of the Stmt.get() variants,
157843 + ACHTUNG #2: The semantics of the `bind` and `callback`
157908 + of the following forms:
157916 + 'callback' property of the options object. In the final
157932 + and it is (as of this writing) illegal to use WASM
157938 + - .arity: the number of arguments which SQL calls to this
157940 + callback's length property (i.e. the number of declared
157941 + parameters it has). A value of -1 means that the function
157942 + is variadic and may accept any number of arguments, up to
158075 + the value of the first result column. If it has no results,
158093 + Exports a copy of this db's file as a Uint8Array and
158103 + Maintenance reminder: the corresponding sql.js impl of this
158108 + platform but might be necessary on others. Because of that
158133 + returns a falsy value. As a special case, a value of
158134 + undefined is treated as a bind type of null. */
158158 + If key is a number and within range of stmt's bound parameter
158172 + else if(n<1 || n>stmt.parameterCount) toss("Bind index",key,"is out of range.");
158176 + /** Throws if ndx is not an integer or if it is out of range
158180 + but the resulting error will be about an out-of-bounds column
158185 + toss("Column index",ndx,"is out of range.");
158328 + object, or a value of a bindable type (see below).
158332 + a value of a bindable type.
158343 + client-side uses.) Conversely, a value of undefined as an
158350 + as of this writing, illegal to call (from JS) a WASM
158353 + the distinction of binding doubles which have no
158355 + majority of clients due to sqlite3's data typing
158364 + If passed an array, each element of the array is bound at
158378 + - Any bind index is out of range, a named bind parameter
158382 + - Any value to bind is of an unsupported type.
158399 + uses when passing on arguments between 2+ levels of
158411 + /* bind each entry by index */
158435 + Special case of bind() which binds the given value
158436 + using the BLOB binding mechanism instead of the default
158438 + or named bind index. The value must be of type string,
158441 + If passed a single argument, a bind index of 1 is assumed.
158459 + a row of data is available, true is returned. If no row of
158476 + Fetches the value from the given 0-based column index of
158477 + the current data row, throwing if index is out of range.
158482 + By default it will determine the data type of the result
158484 + of the enumeration values for sqlite3 types, which are
158485 + defined as members of the sqlite3 module: SQLITE_INTEGER,
158493 + assigns the indexes of the array, from 0 to the number of
158494 + result columns, to the values of the corresponding column,
158498 + differentlier: it assigns the properties of the object to
158499 + the values of their corresponding result columns.
158505 + JSON.parse(), returning the result of that. Until then,
158548 + instead of being copied. */
158554 + "type of result column #"+ndx+".");
158582 + Returns the result column name of the given index, or
158583 + throws if index is out of bounds or this statement has been
158594 + function returns an array of all such names. If passed an
158598 + holds the number of columns.
158633 + If optName is an array then it is expected to be a list of
158640 + compilation options and this function sets each entry to
158651 + "SQLITE_" prefix. When it returns an object of all options,
158703 + End of main window thread. What follows is only intended for use
158724 + - Fetching multiple results: do we pass them on as a series of
158733 + passing around arrays of those may quickly exhaust the JS
158739 + potentially be done via a simple mapping of DB.filename or
158744 + ease of use). Client-side usability of this feature would
158751 + of saving memory (the VFS lives in RAM). Supporting multiple
158755 + better. As of this writing, ATTACH will fail fatally in the
158790 + A level of "organizational abstraction" for the Worker
158793 + dispatch all inbound messages to a method of this object,
158794 + passing it the event.data part of the inbound event object. All
158802 + Proxy for DB.exec() which expects a single argument of type
158818 + And, at the end of the result set (whether or not any
158841 + /* Since the default rowMode of 'stmt' is not useful
158851 + // Part of a copy-avoidance optimization for blobs
158946 + A subset of the DB API is accessible via Worker messages in the form:
158951 + As a rule, these commands respond with a postMessage() of their
158957 + dispatching of these asynchronous results. Exceptions thrown
158963 + errorClass: class name of the error type,
159006 + The author disclaims copyright to this source code. In place of a
159010 + * May you find forgiveness for yourself and forgive others.
159021 + This seemingly superfluous level of indirection is necessary when
159026 + timing/order-of-operations conflict (and that symbol is not exported
159035 + for the sake of clarity in the timing of when it's okay to use the
159072 +span.labeled-input {
159102 + <header id='titlebar'><span>sqlite3-api.js tests</span></header>
159132 + The author disclaims copyright to this source code. In place of a
159136 + * May you find forgiveness for yourself and forgive others.
159332 + <header id='titlebar'><span>sqlite3-worker.js tests</span></header>
159361 + The author disclaims copyright to this source code. In place of a
159365 + * May you find forgiveness for yourself and forgive others.
159391 + this. The event-handling plumbing of this file requires that
159393 + a queued callback entry, as the existence of that property in
159395 + entry off of the queue.
159414 + a hard requirement of all of the Worker-exposed APIs. */
159456 + create a queue of callbacks to handle them. The problem
159459 + handler queue entry. We have to perform some extra
159604 + int nRef; /* Number of pointers to this object */
159725 int nPoslist = 0; /* Number of bytes in aPoslist */
159726 int iPrev = -1; /* Token number of previous deferred token */
159846 -# This script builds a single C code file holding all of FTS3 code.
159847 -# The name of the output file is fts3amal.c. To build this file,
159852 -# The make target above moves all of the source code files into
159853 -# a subdirectory named "tsrc". (This script expects to find the files
159865 -# of the file.
159871 -** This file is an amalgamation of separate C source files from the SQLite
159881 -# These are the header files used by FTS3. The first time any of these
159883 -# text of the file in-line. The file only needs to be included once.
159923 - section_comment "Include $hdr in the middle of $tail"
159940 - section_comment "End of $tail"
159945 -# used subroutines first in order to help the compiler find
159984 int nRead; /* Total number of blocks read */
160248 SQL schema. Changing the definition of a collation sequence after
160260 + the fact of database corruption. Database corruption may well
160274 ** will be a variable-length integer encoding of the key.
160327 +** The author disclaims copyright to this source code. In place of
160331 +** May you find forgiveness for yourself and forgive others.
160340 +** The schema of the virtual table is this:
160343 +** vn TEXT, -- Name of an sqlite3_index_info field
160355 +** The virtual table returns a description of the sqlite3_index_info object
160359 +** The values of the "a" through "e" columns are one of:
160366 +** value of the right-hand side has its 0x001 bit set.
160403 +/* qpvtab_vtab is a subclass of sqlite3_vtab which is
160404 +** underlying representation of the virtual table
160411 +/* qpvtab_cursor is a subclass of sqlite3_vtab_cursor which will
160412 +** serve as the underlying representation of a cursor that scans
160413 +** over rows of the result
160420 + int nData; /* Number of bytes of data */
160425 +** Names of columns
160518 +** Advance a qpvtab_cursor to its next row of output.
160532 +** Return values of columns for the row at which the qpvtab_cursor
160583 +** Return TRUE if the cursor has been moved off of the last
160584 +** row of output.
160593 +** to the first row of output. This method is always called at least
160611 +** Append the text of a value to pStr
160809 ** of regexp(PATTERN,STRING). */
160837 * Hash a single 512-bit block. This is the core of the algorithm.
160849 ** The sha3(X) function computes the SHA3 hash of the input X, or NULL if
160852 -** The sha3_query(Y) function evalutes all queries in the SQL statements of Y
160853 +** The sha3_query(Y) function evaluates all queries in the SQL statements of Y
160854 ** and returns a hash of their results.
160883 /* stmt_vtab is a subclass of sqlite3_vtab which will
160884 ** serve as the underlying representation of a stmt virtual table
161094 ZipfileEntry e; /* New entry to add to zip archive */
161124 +# The author disclaims copyright to this source code. In place of
161128 +# May you find forgiveness for yourself and forgive others.
161244 -** Versions of isspace(), isalnum() and isdigit() to which it is safe
161249 /* Use the SQLite core versions if this routine is part of the
162843 \ No newline at end of file
162845 \ No newline at end of file
163063 ** 1. type: Type of object ("table", "view" etc.)
163117 -** The implementation of an SQL scalar function that rewrites DDL statements
163162 ** 5: "when" part of error message.
163227 ** If D is the count of distinct values and K is the total number of
163238 sqlite3_str sStat; /* Text of the constructed "stat" line */
163319 ** In this version of BtreeMoveto, pKey is a packed index record
163401 - ** past the end of the key value. */
163425 + u8 *pIter = pCell; /* For looping over bytes of pCell */
163431 + ** the (CellInfo.nSize) value found by doing a full parse of the
163432 + ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of
163449 + ** past the end of the key value. */
163482 ** The cell pCell is currently part of page pSrc but will ultimately be part
163483 -** of pPage. (pSrc and pPager are often the same.) If pCell contains a
163484 +** of pPage. (pSrc and pPage are often the same.) If pCell contains a
163485 ** pointer to an overflow page, insert an entry into the pointer-map for
163491 int iAddr = hdr + 1; /* Address of ptr to pc */
163492 - int pc = get2byte(&aData[iAddr]); /* Address of a free slot */
163494 + int pc = get2byte(pTmp); /* Address of a free slot */
163495 int x; /* Excess size of the slot */
163497 int size; /* Size of the free slot */
163499 /* EVIDENCE-OF: R-22710-53328 The third and fourth bytes of each
163500 ** freeblock form a big-endian integer which is the size of the freeblock
163515 /* This slot extends off the end of the usable part of the page */
163526 /* The next slot in the chain is not past the end of the current slot */
163528 u8 * const data = pPage->aData; /* Local cache of pPage->aData */
163529 int top; /* First byte of cell content area */
163532 int gap; /* First byte of gap between cell pointers and cell content */
163536 ** then the cell content offset of an empty page wants to be 65536.
163538 ** integer, so a value of 0 is used in its place. */
163570 /* The new freeblock is at the beginning of the cell content area,
163579 /* EVIDENCE-OF: R-07291-35328 A value of 5 (0x05) means the page is an
163614 ** number of cells on the page. */
163661 - /* One of the uses of pBt->pTmpSpace is to format cells before
163666 - ** bytes of pTmpSpace, but that the first 4 bytes are copied from
163668 - ** does cause a valgrind error when the 1 or 2 bytes of unitialized
163670 - ** zero the first 4 bytes of temp space here.
163672 - ** Also: Provide four bytes of initialized space before the
163673 - ** beginning of pTmpSpace as an area available to prepend the
163674 - ** left-child pointer to the beginning of a cell.
163694 + /* One of the uses of pBt->pTmpSpace is to format cells before
163699 + ** bytes of pTmpSpace, but that the first 4 bytes are copied from
163701 + ** does cause a valgrind error when the 1 or 2 bytes of unitialized
163703 + ** zero the first 4 bytes of temp space here.
163705 + ** Also: Provide four bytes of initialized space before the
163706 + ** beginning of pTmpSpace as an area available to prepend the
163707 + ** left-child pointer to the beginning of a cell.
163849 +** of the cell at pCur[idx] and pIdxKey.
163851 +** This routine is part of an optimization. It is always safe to return
163862 + int nCell; /* Size of the pCell cell in bytes */
163867 + /* This branch runs if the record-size field of the cell is a
163889 +** page of a table.
163901 /* Move the cursor so that it points to an entry in an index table
163909 + /* Check to see if we can skip a lot of work. Two cases:
163915 + ** (2) If the cursor is on the last page of the table and the first
163966 ** be the right kind (index or table) of b-tree page. Otherwise
163976 int nCell; /* Size of the pCell cell in bytes */
163997 int hdr; /* Beginning of the header. 0 most pages. 100 page 1 */
164039 /* Add cells to the start of the page */
164066 + ** (2) The amount of free space on the page is less than 2/3rds of
164081 BtCursor *pCur, /* Insert data into the table of this cursor */
164082 const BtreePayload *pX, /* Content of the row to be inserted */
164084 - int seekResult /* Result of prior MovetoUnpacked() call */
164085 + int seekResult /* Result of prior IndexMoveto() call */
164108 - ** blob of associated data. */
164111 /* Save the positions of any other cursors open on this table.
164138 + ** blob of associated data. */
164164 loc==0 ? "overwrite" : "new entry"));
164171 u32 nRem; /* Bytes of data still to copy */
164190 - int iCellIdx; /* Index of cell to delete */
164191 - int iCellDepth; /* Depth of node containing pCell */
164192 - CellInfo info; /* Size of the cell being deleted */
164198 + int iCellIdx; /* Index of cell to delete */
164199 + int iCellDepth; /* Depth of node containing pCell */
164200 + CellInfo info; /* Size of the cell being deleted */
164246 ** will be left in CURSOR_SKIPNEXT state pointing to the entry immediately
164247 - ** before or after the deleted entry. In this case set bSkipnext to true. */
164248 + ** before or after the deleted entry.
164264 /* A b-tree rebalance will be required after deleting this entry.
164282 + /* Optimization: If the free space is less than 2/3rds of the page,
164316 u8 *apOvfl[4]; /* Pointers to the body of overflow cells */
164317 BtShared *pBt; /* Pointer to BtShared that this page is part of */
164318 u8 *aData; /* Pointer to disk image of the page data */
164319 - u8 *aDataEnd; /* One byte past the end of usable data */
164320 + u8 *aDataEnd; /* One byte past the end of the entire page - not just
164334 ** These macros define the location of the pointer-map entry for a
164353 /* Begin by generating some termination code at the end of the
164406 /* A minimum of one cursor is required if autoincrement is used
164467 int addrInsLoop; /* Top of the loop for inserting rows */
164480 Select *pSel; /* Copy of the SELECT that implements the view */
164481 int nErr = 0; /* Number of errors encountered */
164482 - int n; /* Temporarily holds the number of cursors assigned */
164537 sqlite3ErrorMsg(pParse, "unsupported use of NULLS %s",
164571 /* Add an entry in sqlite_schema for this index
164668 Token *pDatabase, /* Name of the database containing pTable */
164669 Token *pAlias, /* The right-hand side of the AS subexpression */
164670 Select *pSubquery, /* A subquery used in place of a table name */
164671 - Expr *pOn, /* The ON clause of a join */
164672 - IdList *pUsing /* The USING clause of a join */
164734 +** * All tables to the left of the right-most RIGHT JOIN are tagged with
164736 +** code generator can easily tell that the table is part of
164737 +** the left operand of at least one RIGHT JOIN.
164755 + /* All terms to the left of a RIGHT JOIN should be tagged with the
164789 +** To modify this header, edit any of the various lists in that script
164790 +** which specify categories of generated conditionals in this file.
164865 ** non-zero on any kind of error.
164872 +** invoked in place of the OS-defined localtime() function.
164875 ** library function localtime_r() is used to assist in the calculation of
164934 /* Initialize the contents of sLocal to avoid a compiler warning. */
165011 ** of several units of time.
165015 - u8 nName; /* Length of th name */
165016 - char *zName; /* Name of the transformation */
165019 + u8 nName; /* Length of the name */
165020 + char zName[7]; /* Name of the transformation */
165041 const char *z, /* The text of the modifier */
165042 int n, /* Length of zMod in bytes */
165045 + int idx /* Parameter index of the modifier */
165081 + ** value in the allowed range of julian day numbers understood by
165205 +** Return the number of seconds (including fractional seconds) since
165206 +** the unix epoch of 1970-01-01 00:00:00 GMT.
165359 +/* Generate byte-code that will report the number of rows modified
165371 ** A table is read-only if any of the following are true:
165397 ** put in an SrcList structure because some of the subroutines we
165416 ** ONEPASS_MULTI: One-pass approach - any number of rows may be deleted.
165463 - sqlite3ErrorMsg(pParse, "unsafe use of %s()", pDef->zName);
165464 + sqlite3ErrorMsg(pParse, "unsafe use of %#T()", pExpr);
165489 +** Clear both elements of an OnOrUsing object
165563 - /* Note that because the size of the allocation for p->a[] is not
165564 - ** necessarily a power of two, sqlite3IdListAppend() may not be called
165606 /* If dequote==0, then pName->z does not point to part of a DDL
165619 /* If pWalker->eCode is 2 then any term of the expression that comes from
165620 - ** the ON or USING clauses of a left join disqualifies the expression
165621 + ** the ON or USING clauses of an outer join disqualifies the expression
165644 +** (3) pSrc cannot be part of the left operand for a RIGHT JOIN.
165647 +** (4) If pSrc is the right operand of a LEFT JOIN, then...
165651 +** (5) If pSrc is not the right operand of a LEFT JOIN or the left
165652 +** operand of a RIGHT JOIN, then pExpr must be from the WHERE
165672 ** all members of the RHS set, skipping duplicates.
165674 ** A cursor is opened on the b-tree object that is the RHS of the IN operator
165675 -** and pX->iTable is set to the index of that cursor.
165676 +** and the *piTab parameter is set to the index of that cursor.
165678 ** The returned value of this function indicates the b-tree type, as follows:
165681 ** If the RHS of the IN operator is a list or a more complex subquery, then
165683 ** pX->iTable made to point to the ephemeral table instead of an
165685 +** existing table. In this case, the creation and initialization of the
165686 +** ephmeral table might be put inside of a subroutine, the EP_Subrtn flag
165690 ** The inFlags parameter must contain, at a minimum, one of the bits
165694 Select *p; /* SELECT to the right of IN operator */
165695 int eType = 0; /* Type of RHS table. IN_INDEX_* */
165696 - int iTab = pParse->nTab++; /* Cursor of the RHS table */
165697 + int iTab; /* Cursor of the RHS table */
165705 /* If the RHS of this IN(...) operator is a SELECT, and if it matters
165721 + pParse->nTab--; /* Back out the allocation of the unused cursor */
165775 /* The evaluation of the EXISTS/SELECT must be repeated every time it
165776 ** is encountered if any of the following is true:
165857 ** of the first argument.
165862 - sqlite3ErrorMsg(pParse, "misuse of aggregate: %s()", pExpr->u.zToken);
165863 + sqlite3ErrorMsg(pParse, "misuse of aggregate: %#T()", pExpr);
165981 ** for clarity, but we are out of bits in the Expr.flags field so we
166011 -** Terms of p that are marked with EP_FromJoin (and hence that come from
166012 -** the ON or USING clauses of LEFT JOINS) are excluded from the analysis.
166013 +** Terms of p that are marked with EP_OuterON (and hence that come from
166014 +** the ON or USING clauses of OUTER JOINS) are excluded from the analysis.
166076 +** Clear the apTrigger[] cache of CASCADE triggers for all foreign keys
166145 +** Return the subtype of X
166157 ** Implementation of the length() function
166162 -** Implementation of the printf() function.
166163 +** Implementation of the printf() (a.k.a. format()) SQL function.
166171 -** Implementation of the QUOTE() function. This function takes a single
166176 +** Append to pStr text that is the SQL literal representation of the
166279 +** Implementation of the QUOTE() function.
166281 +** The quote(X) function returns the text of an SQL literal which is the
166282 +** value of its argument suitable for inclusion into an SQL statement.
166305 ** for the first character of the input string.
166492 /* If currently processing the PRIMARY KEY of a WITHOUT ROWID
166498 ** of the matched index row are different from the original PRIMARY
166512 - return 0; /* Must be of the form INSERT INTO ... SELECT ... */
166547 ** a JSONB type in the future which stores a binary encoding of JSON in
166578 -** Versions of isspace(), isalnum() and isdigit() to which it is safe
166582 - /* Use the SQLite core versions if this routine is part of the
166636 -** Some of the testcase() macros in this file are problematic for gcov
166840 +** always return a JSON representation of the result. If JSON_SQL is set,
166841 +** then always return an SQL representation of the result. If neither flag
166846 +** containing the result of each PATH.
166914 + ** element of the array being the value selected by one of the PATHs */
166958 JsonNode *pResult; /* The result of the merge */
167006 -** Return the top-level "type" of a JSON string. Throw an error if
167008 +** Return the top-level "type" of a JSON string. json_type() raises an
167115 /* Append the name of the path for element i to pStr
167375 +** Return the byte offset of the most recent error
167389 ** Return UTF-16 encoded English language explanation of the most recent
167400 + ** Search at http://web.archive.org/ to find the 2015-03-16 archive
167401 + ** of the link above to see the original text.
167448 + ** If 2, then invoke xAlt() instead of localtime(). If 0, normal
167457 + ** xAlt should write results in to struct tm object of its 2nd argument
167528 +** Return the name of the N-th database schema. Return NULL if N is out
167529 +** of range.
167546 ** Return the filename of the database associated with a database
167553 ** Free any prior content in *pz and replace it with a copy of zNew.
167584 + sqlite3ErrorMsg(db->pParse, "out of memory");
167629 ** atomic-write optimization. In this case the first 28 bytes of the
167630 - ** journal file may be written as part of committing the transaction. */
167634 + ** journal file may be written as part of committing the transaction. */
167688 +/* Maximum number of symlinks that will be resolved while trying to
167696 ** The default size of a disk sector
167711 u16 mask; /* Mask of locks to take or release */
167762 -** If the last component of the pathname in z[0]..z[j-1] is something
167780 + int nSymlink; /* Number of symlinks resolved */
167782 + int nOut; /* Bytes of space available to zOut[] */
167783 + int nUsed; /* Bytes of zOut[] currently being used */
167793 -** Remove all instances of /./
167794 -** Remove all isntances of /X/../ for any X
167800 - int nOut /* Allocated size of buffer zOut */
167804 + int nName /* Number of significant bytes in zName */
167837 - ** of a pathname is allowed since this is important on windows. */
167869 - ** previous term of the directory if it is something other than "..".
167927 int nOut, /* Size of output buffer in bytes */
167935 - int nLink = 0; /* Number of symbolic links followed so far */
167936 - const char *zIn = zPath; /* Input path for each iteration of loop */
168029 ** Interfaces for opening a shared library, finding entry points
168041 u16 mask; /* Mask of locks to take or release */
168057 Pgno mxPgno; /* Maximum allowed size of the database */
168059 i64 pageSize; /* Number of bytes in a page */
168061 char *zFilename; /* Name of the database file */
168069 ** + 4 bytes: N (length of super-journal name in bytes, no nul-terminator).
168072 /* Write the super-journal data to the end of the journal file. If
168115 /* Copy original pages out of the journal and back into the
168171 /* In this case the pcache already contains an initialized copy of
168250 int *pnCkpt /* OUT: Final number of checkpointed frames */
168279 ** used in the journal to signify that the remainder of the journal file
168329 // "seltablist" is a "Select Table List" - the content of the FROM clause
168476 - ** new Expr to populate pOut. Set the span of pOut to be the identifier
168566 ** regardless of the value of expr1.
168626 + sqlite3ErrorMsg(db->pParse, "out of memory");
168638 int addrTop; /* Top of a loop checking foreign keys */
168749 + if( db->mallocFailed ) sqlite3ErrorMsg(pParse, "out of memory");
168753 +** Maximum number of times that we will try again to prepare a statement
168765 const char **pzTail /* OUT: End of parsed string */
168782 + if( db->mallocFailed ) sqlite3ErrorMsg(&sParse, "out of memory");
168785 /* For a long-term use prepared statement avoid the use of
168919 } /* End of function */
168923 +** The z string points to the first character of a token that is
168946 +** If pExpr has a byte offset for the start of a token, record that as
168961 ** able to accept at least N more bytes of text.
168963 ** Return the number of bytes of text that StrAccum is able to accept
168990 - ** sqlite3DbFree(db, pDup) on the last line of this block, so be sure to
168991 - ** make a copy of the token before doing the sqlite3DbFree().
169071 ** Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up
169072 ** that name in the set of source tables in pSrcList and make the pExpr
169075 Schema *pSchema = 0; /* Schema of the expression */
169079 Column *pCol; /* A column of pTab */
169096 + ** parenthesized subset of the FROM clause terms. Example:
169170 - ** is for the right-hand table of a NATURAL JOIN or is in a
169319 const char *zMsg, /* Type of error */
169360 int wrong_num_args = 0; /* True if wrong number of arguments */
169362 - int nId; /* Number of characters in function name */
169427 - sqlite3ErrorMsg(pParse, "misuse of %s function %.*s()",zType,nId,zId);
169428 + sqlite3ErrorMsg(pParse, "misuse of %s function %#T()",zType,pExpr);
169434 - sqlite3ErrorMsg(pParse,"misuse of aggregate function %.*s()",nId,zId);
169435 + sqlite3ErrorMsg(pParse,"misuse of aggregate function %#T()",pExpr);
169447 - sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()",
169449 + sqlite3ErrorMsg(pParse,"wrong number of arguments to function %#T()",
169508 int i, /* The index (1-based) of the term out of range */
169509 - int mx /* Largest permissible value of i */
169510 + int mx, /* Largest permissible value of i */
169514 "%r %s BY term out of range - should be "
169573 ** order-by term to a copy of the result-set expression */
169597 /* If the number of references to the outer context changed when
169620 u8 eTnctType; /* One of the WHERE_DISTINCT_* operators */
169622 int addrTnct; /* Address of OP_OpenEphemeral opcode for tabTnct */
169650 +** of other non-standard and in many cases non-sensical join types.
169652 +** type and returns a result. Examples of accepted nonsense join types
169671 +** * If "OUTER" is present then there must also be one of
169677 u8 nChar; /* Length of the keyword in characters */
169751 ** of the matching column and return TRUE.
169755 SrcList *pSrc, /* Array of tables to search */
169756 - int N, /* Number of tables in pSrc->a[] to search */
169757 + int iStart, /* First member of pSrc->a[] to check */
169758 + int iEnd, /* Last member of pSrc->a[] to check */
169759 const char *zCol, /* Name of the column we are looking for */
169760 int *piTab, /* Write index of pSrc->a[] here */
169761 int *piCol, /* Write index of pSrc->a[*piTab].pTab->aCol[] here */
169766 int iCol; /* Index of column matching zCol */
169788 -** WHERE clause expression of a SELECT statement. The new term, which
169789 -** is ANDed with the existing WHERE clause, is of the form:
169794 -** (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is
169795 -** column iColRight of tab2.
169799 - SrcList *pSrc, /* List of tables in FROM clause */
169800 - int iLeft, /* Index of first table to join in pSrc */
169801 - int iColLeft, /* Index of column in first table */
169802 - int iRight, /* Index of second table in pSrc */
169803 - int iColRight, /* Index of column in second table */
169834 -** Set the EP_FromJoin property on all terms of the given expression.
169836 +** Set the EP_OuterON property on all terms of the given expression.
169840 -** The EP_FromJoin property is used on terms of an expression to tell
169841 -** the LEFT OUTER JOIN processing logic that this term is part of the
169842 +** The EP_OuterON property is used on terms of an expression to tell
169843 +** the OUTER JOIN processing logic that this term is part of the
169845 ** of the more general WHERE clause. These terms are moved over to the
169886 -/* Undo the work of sqlite3SetJoinExpr(). In the expression p, convert every
169889 +/* Undo the work of sqlite3SetJoinExpr(). This is used when a LEFT JOIN
169891 +** "pushed down" into the WHERE clause of a subquery.
169900 +** if the table that p references is on the left side of a RIGHT JOIN.
169936 -** ON and USING clauses are converted into extra terms of the WHERE clause.
169948 ** The terms of a FROM clause are contained in the Select.pSrc structure.
169949 ** The left most table is the first entry in Select.pSrc. The right-most
169950 ** table is the last entry. The join operator is held in the entry to
169951 -** the left. Thus entry 0 contains the join operator for the join between
169952 +** the right. Thus entry 1 contains the join operator for the join between
169954 -** also attached to the left entry.
169955 +** also attached to the right entry.
169957 ** This routine returns the number of errors encountered.
169989 char *zName; /* Name of column in the right table */
170017 - /* Add the ON clause to the end of the WHERE clause, connected by
170044 char *zName; /* Name of the term in the USING clause */
170046 int iLeftCol; /* Column number of matching column on the left */
170047 int iRightCol; /* Column number of matching column on the right */
170048 + Expr *pE1; /* Reference to the column on the LEFT of the join */
170049 + Expr *pE2; /* Reference to the column on the RIGHT of the join */
170069 + ** JOINs. If only a single table on the left side of this join
170072 + ** of the join, construct a coalesce() function that gathers all
170073 + ** such tables. Raise an error if more than one of those references
170077 + ** non-USING references to zName on the left of an INNER or LEFT
170078 + ** JOIN. But older versions of SQLite do not do that, so we avoid
170115 + /* Add the ON clause to the end of the WHERE clause, connected by
170241 /* Use the original text of the column expression as its name */
170282 ** The "LIMIT of exactly 1" case of condition (1) comes about when a VALUES
170295 + int nSelect; /* Number of SELECT statements in the compound */
170318 /* Allocate a range of temporary registers and the KeyInfo needed
170382 +** target slot in the parent is the right operand of a LEFT JOIN, or one of
170383 +** the left operands of a RIGHT JOIN. In either case, we need to potentially
170401 +** When the subquery on the right side of the LEFT JOIN is flattened, we
170402 +** have to add OP_IfNullRow in front of the OP_Integer that implements the
170403 +** "m" value of the subquery so that a NULL will be loaded instead of 59
170404 +** when processing a non-matched row of the left.
170462 ** just as it did when it was a column of a view or sub-query. */
170485 ** (17f) the subquery must not be the RHS of a LEFT JOIN.
170486 +** (17g) either the subquery is the first element of the outer
170488 +** of the subquery. (This is a duplicate of condition (27b).)
170496 +** (26) The subquery may not be the right operand of a RIGHT JOIN.
170500 +** is the first element of the parent query. This must be the
170504 +** in any arm of the compound query. (See also (17g).)
170508 +** (29) Either the subquery is not the right-hand operand of a join with an
170509 +** ON or USING clause nor the right-hand operand of a NATURAL JOIN, or
170510 +** the right-most table within the FROM clause of the subquery
170511 +** is not part of an outer join.
170517 SrcList *pSubSrc; /* The FROM clause of the subquery */
170518 int iParent; /* VDBE cursor number of the pSub result set temp table */
170520 - int isLeftJoin = 0; /* True if pSub is the right side of a LEFT JOIN */
170521 + int isOuterJoin = 0; /* True if pSub is the right side of a LEFT JOIN */
170568 + ** We do not want two constraints on the same term of the flattened
170570 + ** To prevent this, one or the other of the following conditions must be
170573 + ** (29a) The right-most entry in the FROM clause of the subquery
170574 + ** must not be part of an outer join.
170576 + ** (29b) The subquery itself must not be the right operand of a
170596 ** use only the UNION ALL operator. And none of the simple select queries
170613 + ** omitted on left-hand tables of the right join that is being
170643 pSubSrc = pSub->pSrc; /* FROM clause of subquery */
170644 nSubSrc = pSubSrc->nSrc; /* Number of terms in subquery FROM clause */
170699 int nChng; /* Number of times a constant is propagated */
170744 + /* Do not propagate constants through the ON clause of a LEFT JOIN */
170753 Expr *pWhere, /* The WHERE clause of the outer query */
170754 - int iCursor, /* Cursor number of the subquery */
170755 - int isLeftJoin /* True if pSubq is the right term of a LEFT JOIN */
170756 + SrcItem *pSrc /* The subquery term of the outer FROM clause */
170849 +** Check the N SrcItem objects to the right of pBase. (N might be zero!)
170850 +** If any of those SrcItem objects have a USING clause containing zName
170853 +** If N is zero, or none of the N SrcItem objects to the right of pBase
170854 +** contains a USING clause, or if none of the USING clauses contain zName,
170878 /* Process NATURAL keywords, and ON and USING clauses of joins.
170906 + ExprList *pNestedFrom; /* Result-set of a nested FROM clause */
170989 - ** table to the right of the join */
171128 SELECTTRACE(0x400,pParse,p,("After count-of-view optimization:\n"));
171136 +** If any term of pSrc, or any SF_NestedFrom sub-query, is not the same
171189 /* All of these destinations are also able to ignore the ORDER BY clause */
171254 /* Convert LEFT JOIN into JOIN if there are terms of the right table
171255 ** of the LEFT JOIN used in the WHERE clause.
171271 /* No futher action if this term of the FROM clause is no a subquery */
171335 + ** The subquery is implemented as a co-routine if all of the following are
171344 + ** (3) the subquery is not part of a left operand for a RIGHT JOIN
171354 /* Implement a co-routine that will return a single row of the result
171368 /* If the subquery is not correlated and if we are not inside of
171369 ** a trigger, then we only need to compute the value of the subquery
171395 ** original setting of the SF_Distinct flag, not the current setting */
171435 ** ORDER BY to maximize the chances of rows being delivered in an
171560 -** Out-of-memory simulator variables
171563 -static unsigned int oomRepeat = 0; /* Number of OOMs in a row */
171568 ** This is the name of our program. It is set in main(), used
171569 ** in a number of other places, mostly for error messages.
171592 +** out-of-memory error.
171657 ** Return the value of a hexadecimal digit. Return -1 if the input
171744 ** instance of the following structure.
171746 u8 eTraceType; /* SHELL_TRACE_* value for type of trace */
171748 u8 bSafeModePersist; /* The long-term value of bSafeMode */
171751 unsigned mEqpLines; /* Mask of veritical lines in the EQP output graph */
171752 + int inputNesting; /* Track nesting level of .read and other redirects */
171754 int cnt; /* Number of records displayed so far */
171755 int lineno; /* Line number of last line read from in */
171788 +#define MODE_Count 17 /* Output only a count of the rows of output */
171901 +** Maybe construct two lines of text that point out the position of a
172017 ** and ends on one of:
172020 int nAlloc = 0; /* Allocated size of p->aiIndent[], abYield */
172021 int iOp; /* Index of operation in p->aiIndent[] */
172062 +** z[] is a line of text that is to be displayed the .mode box or table or
172066 +** Compute characters to display on the first line of z[]. Stop at the
172068 +** from malloc()) of that first line, which caller should free sometime.
172074 + const unsigned char **pzTail, /* OUT: Tail of the input for next line */
172158 +/* Extract the value of the i-th current column for pStmt as an SQL literal
172191 ** Run a prepared statement and output the result in one of the
172388 + raw_printf(stderr, "sqlite3_expert_new: %s\n", zErr ? zErr : "out of memory");
172483 ** Text of help messages.
172489 ** There must be two or more spaces between the end of the command and the
172490 ** start of the description of what that command does.
172497 " Each command must have exactly one of the following options:",
172514 ".changes on|off Show number of rows changed by SQL",
172520 ".databases List names and files of attached databases",
172533 ".excel Display the output of next command in spreadsheet",
172543 ".fullschema ?--indent? Show schema and the content of sqlite_stat tables",
172544 ".headers on|off Turn display of headers on or off",
172551 " --skip N Skip the first N rows of input",
172555 " * If TABLE does not exist, it is created. The first row of input",
172577 " MODE is one of:",
172614 + " TABLE The name of SQL table used for \"insert\" mode",
172618 ".nullvalue STRING Use STRING in place of NULL values",
172633 " --append Use appendvfs to append database to the end of FILE",
172637 " --hexdb Load the output of \"dbtotxt\" as an in-memory db",
172671 ".restore ?DB? FILE Restore content of DB (default \"main\") from FILE",
172695 ".tables ?TABLE? List names of tables matching LIKE pattern TABLE",
172712 ** text of all commands that match. */
172720 n = (n+pgsz-1)&~(pgsz-1); /* Round n up to the next multiple of pgsz */
172723 - utf8_printf(stderr, "Out of memory!\n");
172985 + * pointer is non-zero, its referent will be set to a summary of renames
173008 + * from protected part of incoming column names. This defaults to "_"
173244 ** Then read the content of the testcase-out.txt file and compare against
173336 char *zFile = 0; /* Name of file to extra content from */
173338 int nCol; /* Number of columns in the table */
173341 int nSep; /* Number of bytes in p->colSeparator[] */
173621 + * overwrites already-set values, user was informed of this.
173732 raw_printf(stderr, "Error: mode should be one of: "
173754 ** at the end of this procedure */
173795 char *zNewFilename = 0; /* Name of the database file to open */
173796 int iName = 1; /* Index in azArg[] of the filename */
174237 +** without moving lots of code around (creating a larger/messier diff).
174269 int startline = 0; /* Line number for start of current input */
174498 +** portable enough to make real use of.
174505 +** Returns the filename of the given db name, assuming "main" if
174517 +** purposes of the fiddle build, that the file is in a transient
174599 ** change the value of the error code. The error-code preserving
174618 +** of the start of that token. ^The byte offset returned by
174625 ** the time of the first error and the call to these interfaces.
174648 ** implementation of [application-defined SQL functions] are protected.
174659 +** which is native to the platform, regardless of the text encoding set
174669 -** The these routines may attempt to convert the datatype of the result.
174670 +** These routines may attempt to convert the datatype of the result.
174689 +** of sqlite3_value_dup(V) is a NULL value.
174702 +** for the N-th database on database connection D, or a NULL pointer of N is
174703 +** out of range. An N value of 0 means the main database file. An N of 1 is
174704 +** the "temp" schema. Larger values of N correspond to various ATTACH-ed
174715 +** private copy of the result prior to releasing the mutex.
174726 -** an operator that is part of a constraint term in the wHERE clause of
174727 +** an operator that is part of a constraint term in the WHERE clause of
174746 +** ^The left-hand operand of the operator is given by the corresponding
174747 +** aConstraint[].iColumn field. ^An iColumn of -1 indicates the left-hand
174756 +** by the [xFindFunction|xFindFunction method] of the virtual table
174772 +** tables, the collating sequence of constraints does not matter (for example
174816 ** The counter is incremented on the first [sqlite3_step()] call of each
174823 +** <dd>^SQLITE_STMTSTATUS_FILTER_HIT is the number of times that a join
174825 +** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of
174826 +** times that the Bloom filter returned a find, and thus the join step
174830 ** <dd>^This is the approximate number of bytes of heap memory
174848 -** method of a [virtual table].
174849 +** method of a [virtual table]. This function returns a pointer to a string
174850 +** that is the name of the appropriate collation sequence to use for text
174867 -** containing the name of the collation sequence for the corresponding
174873 +** a [COLLATE operator], then the name of the collation specified by
174876 +** of the constraint specifies an alternative collating sequence via
174879 +** name of that alternative collating sequence is returned.
174890 +** of a [virtual table] implementation. The result of calling this
174891 +** interface from outside of xBestIndex() is undefined and probably harmful.
174897 +** can meet the ordering requirements of the query planner, it may set
174903 +** sort order defined by the "nOrderBy" and "aOrderBy" fields of the
174906 +** the xBestIndex method to set the "orderByConsumed" flag, regardless of
174919 +** combination of values in the columns identified by the "aOrderBy" field
174935 +** ^For the purposes of comparing virtual table output values to see if the
174948 +** ordered correctly. The use of the "orderByConsumed" flag and the
174950 +** use of the sqlite3_vtab_distinct() interface and the "orderByConsumed"
174962 +** [xBestIndex|xBestIndex() method] of a [virtual table] implementation.
174963 +** The result of invoking this interface from any other context is
174966 +** ^(A constraint on a virtual table of the form
174972 +** the usual mode of handling IN operators, SQLite generates [bytecode]
174974 +** on the right-hand side of the IN operator.)^ Thus the virtual table
174975 +** only sees a single value from the right-hand side of the IN operator
174979 +** table to see all values on the right-hand of the IN operator all at
174989 +** of the IN operator is even possible.
175009 +** ^(All-at-once processing of the IN operator is selected if both of the
175021 +** ^If either or both of the conditions above are false, then SQLite uses
175026 +** [sqlite3_vtab_in_next()] to find all values on the right-hand side
175027 +** of the IN constraint.
175032 +** CAPI3REF: Find all elements on the right-hand side of an IN constraint.
175035 +** [xFilter|xFilter() method] of a [virtual table] implementation.
175036 +** The result of invoking these interfaces from any other context
175040 +** sqlite3_vtab_in_next(X,P) must be one of the parameters to the
175050 +** of the IN constraint using code like the following:
175066 +** on the RHS of the IN constraint. ^If there are no more values on the
175067 +** right hand side of the IN constraint, then *P is set to NULL and these
175069 +** some other value, such as SQLITE_NOMEM, in the event of a malfunction.
175072 +** next call to either of these routines or until the end of the xFilter
175085 +** of a [virtual table] implementation. The result of calling this interface
175086 +** from outside of an xBestIndex method are undefined and probably harmful.
175089 +** the [xBestIndex] method of a [virtual table] implementation, with P being
175090 +** a copy of the [sqlite3_index_info] object pointer passed into xBestIndex and
175092 +** attempts to set *V to the value of the right-hand operand of
175097 +** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th
175103 +** the right-hand operand of a constraint is a literal value in the original
175113 +** and remains valid for the duration of the xBestIndex method call.
175117 +** The "_rhs_" in the name of this routine is an abbreviation for
175175 ** Round up a number to the next larger multiple of 8. This is used
175180 +** ROUND8P() assumes that the argument is already an integer number of
175192 ** Round down to the nearest multiple of 8
175261 + int errByteOffset; /* Byte offset of error in SQL statement */
175328 + char *z; /* Cache of aMem[0].z for vdbeRecordCompareString() */
175329 + i64 i; /* Cache of aMem[0].u.i for vdbeRecordCompareInt() */
175331 + int n; /* Cache of aMem[0].n used by vdbeRecordCompareString() */
175332 u16 nField; /* Number of entries in apMem[] */
175337 ** TK_SELECT_COLUMN: column of the result vector */
175338 i16 iAgg; /* Which entry in pAggInfo->aCol[] or ->aFunc[] */
175339 - int iRightJoinTable; /* If EP_FromJoin, the right table of the join */
175342 + int iOfst; /* else: start of token from start of statement */
175351 -#define EP_FromJoin 0x000001 /* Originates in ON/USING clause of outer join */
175353 -#define EP_HasFunc 0x000004 /* Contains one or more functions of any kind */
175355 +#define EP_OuterON 0x000001 /* Originates in ON/USING clause of outer join */
175356 +#define EP_InnerON 0x000002 /* Originates in ON/USING of an inner join */
175358 +#define EP_HasFunc 0x000008 /* Contains one or more functions of any kind */
175407 /* Macros used to ensure that the correct members of unions are accessed
175413 - u8 sortFlags; /* Mask of KEYINFO_ORDER_* flags */
175414 - unsigned eEName :2; /* Meaning of zEName */
175420 + u8 sortFlags; /* Mask of KEYINFO_ORDER_* flags */
175421 + unsigned eEName :2; /* Meaning of zEName */
175427 + unsigned bUsingTerm:1; /* Term from the USING clause of a NestedFrom */
175435 ** If "a" is the k-th column of table "t", then IdList.a[0].idx==k.
175438 + int nId; /* Number of identifiers on the list */
175439 + u8 eU4; /* Which element of a.u4 is valid */
175441 char *zName; /* Name of the identifier */
175442 - int idx; /* Index in some Table.aCol[] of a column named zName */
175444 - int nId; /* Number of identifiers on the list */
175446 + int idx; /* Index in some Table.aCol[] of a column named zName */
175453 +** Allowed values for IdList.eType, which determines which value of the a.u4
175461 ** The SrcItem object represents a single term in the FROM clause of a query.
175462 ** The SrcList object is mostly an array of SrcItems.
175479 - Expr *pOn; /* The ON clause of a join */
175480 - IdList *pUsing; /* The USING clause of a join */
175482 + Expr *pOn; /* fg.isUsing==0 => The ON clause of a join */
175483 + IdList *pUsing; /* fg.isUsing==1 => The USING clause of a join */
175485 Bitmask colUsed; /* Bit N (1<<N) set if column N of pTab is used */
175497 + Expr *pOn; /* The ON clause of a join */
175498 + IdList *pUsing; /* The USING clause of a join */
175502 ** The following structure describes the FROM clause of a SELECT statement.
175503 ** Each table or subquery in the FROM clause is a separate element of
175506 ** Permitted values of the SrcList.a.jointype field
175508 -#define JT_INNER 0x0001 /* Any kind of inner or cross join */
175509 -#define JT_CROSS 0x0002 /* Explicit use of the CROSS keyword */
175516 +#define JT_INNER 0x01 /* Any kind of inner or cross join */
175517 +#define JT_CROSS 0x02 /* Explicit use of the CROSS keyword */
175522 +#define JT_LTORJ 0x40 /* One of the LEFT operands of a RIGHT JOIN
175527 ** Flags appropriate for the wctrlFlags parameter of sqlite3WhereBegin()
175538 #define SF_CopyCte 0x4000000 /* SELECT statement is a copy of a CTE */
175545 ** The results of a SELECT can be distributed in several ways, as defined
175546 ** by one of the following macros. The "SRT" prefix means "SELECT Result
175549 u8 disableLookaside; /* Number of times lookaside has been disabled */
175559 + TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */
175560 + ParseCleanup *pCleanup; /* List of cleanup operations to run after parse */
175562 int addrCrTab; /* Address of OP_CreateBtree on CREATE TABLE */
175573 Token sArg; /* Complete text of a module argument */
175576 - TriggerPrg *pTriggerPrg; /* Linked list of coded triggers */
175578 - ParseCleanup *pCleanup; /* List of cleanup operations to run after parse */
175584 ** Sizes and pointers of various parts of the Parse object.
175596 - * Each trigger present in the database schema is stored as an instance of
175599 - * Pointers to instances of struct Trigger are stored in two ways.
175600 - * 1. In the "trigHash" hash table (part of the sqlite3* that represents the
175603 - * pNext member of struct Trigger. A pointer to the first element of the
175604 - * linked list is stored as the "pTrigger" member of the associated
175607 - * The "step_list" member points to the first element of a linked list
175610 +** Each trigger present in the database schema is stored as an instance of
175613 +** Pointers to instances of struct Trigger are stored in two ways.
175614 +** 1. In the "trigHash" hash table (part of the sqlite3* that represents the
175617 +** pNext member of struct Trigger. A pointer to the first element of the
175618 +** linked list is stored as the "pTrigger" member of the associated
175621 +** The "step_list" member points to the first element of a linked list
175625 char *zName; /* The name of the trigger */
175631 - * An instance of struct TriggerStep is used to store a single SQL statement
175632 - * that is a part of a trigger-program.
175634 - * Instances of struct TriggerStep are stored in a singly linked list (linked
175635 - * using the "pNext" member) referenced by the "step_list" member of the
175636 - * associated struct Trigger instance. The first element of the linked list is
175637 - * the first step of the trigger-program.
175640 - * "SELECT" statement. The meanings of the other members is determined by the
175641 - * value of "op" as follows:
175647 - * zTarget -> Dequoted name of the table to insert into.
175655 - * zTarget -> Dequoted name of the table to delete from.
175656 - * pWhere -> The WHERE clause of the DELETE statement if one is specified.
175660 - * zTarget -> Dequoted name of the table to update.
175661 - * pWhere -> The WHERE clause of the UPDATE statement if one is specified.
175663 - * pExprList -> A list of the columns to update and the expressions to update
175664 - * them to. See sqlite3Update() documentation of "pChanges"
175668 +** An instance of struct TriggerStep is used to store a single SQL statement
175669 +** that is a part of a trigger-program.
175671 +** Instances of struct TriggerStep are stored in a singly linked list (linked
175672 +** using the "pNext" member) referenced by the "step_list" member of the
175673 +** associated struct Trigger instance. The first element of the linked list is
175674 +** the first step of the trigger-program.
175677 +** "SELECT" statement. The meanings of the other members is determined by the
175678 +** value of "op" as follows:
175684 +** zTarget -> Dequoted name of the table to insert into.
175691 +** zTarget -> Dequoted name of the table to delete from.
175692 +** pWhere -> The WHERE clause of the DELETE statement if one is specified.
175696 +** zTarget -> Dequoted name of the table to update.
175697 +** pWhere -> The WHERE clause of the UPDATE statement if one is specified.
175699 +** pExprList -> A list of the columns to update and the expressions to update
175700 +** them to. See sqlite3Update() documentation of "pChanges"
175707 +** pExprList -> The list of expressions that follow the RETURNING keyword.
175711 u8 op; /* One of TK_DELETE, TK_UPDATE, TK_INSERT, TK_SELECT,
176094 +** N is the index of a wildcard in the prepared statement.
176151 +** error, or -1 of the error does not refer to a specific token.
176184 +** the 'localtime' and 'utc' modifiers of date-time functions. Because
176190 +** (1) Localtime is 30 minutes earlier than (west of) UTC on
176193 +** (2) Localtime is 30 minutes later than (east of) UTC on odd days.
176196 +** of 2000-05-29 14:16:00 in order to test the ability of
176489 +** Implementation of the handle passed to each xBestIndex callback. This
176497 +** Return the result (an integer) of calling sqlite3_vtab_distinct()
176509 + int objc, /* Number of arguments */
176699 int nErr = 0; /* Number of errors encountered */
176701 int n = 0; /* Length of the next token token */
176818 ** Finished with one layer of the tree
176833 ** Generate a single line of output for the tree, with a prefix that contains
176851 ** Shorthand for starting a new tree item that consists of a single label
176860 +** Show a list of Column objects in tree format.
176907 ** Generate a human-readable description of a WITH clause.
177302 +** Generate a human-readable explanation of an id-list.
177352 +** Generate a human-readable explanation of a list of Upsert objects
177382 +** Generate a human-readable diagram of the data structure that go
177438 +** Generate a human-readable diagram of the data structure that go
177508 +** Generate a human-readable diagram of the data structure that go
177586 +** Show a human-readable graph of a TriggerStep
177609 +** Show a human-readable graph of a Trigger
177637 +** These simplified versions of the tree-view routines omit unnecessary
177674 Trigger *pList; /* List of triggers to return */
177709 Token *pTableName, /* Name of the table to be updated */
177712 ExprList *pEList, /* The SET clause: list of column and new values */
177729 ** Return a list of all triggers on table pTab if there exists at least
177730 ** one trigger that must be fired when an operation of type 'op' is
177732 ** least one of the columns in pChanges is being modified.
177738 int op, /* one of TK_DELETE, TK_INSERT, TK_UPDATE */
177746 + int op, /* one of TK_DELETE, TK_INSERT, TK_UPDATE */
177748 + int *pMask /* OUT: Mask of TRIGGER_BEFORE|TRIGGER_AFTER */
177910 /* Insert an OP_Halt at the end of the sub-program. */
177962 /* Code the OP_Program opcode in the parent VDBE. P4 of the OP_Program
177993 /* If there was a FROM clause, set nChangeFrom to the number of expressions
177995 ** clause if this function is being called to generate code for part of
178064 ** If it is not NULL, string zFormat specifies the format of the
178065 -** error string in the style of the printf functions: The following
178072 -** %S Insert the first element of a SrcList
178091 -** %S Insert the first element of a SrcList
178135 -** Note that this routine is only used when one or more of various
178149 - ** possible to this routine is 310, resulting in a maximum x of 31 */
178176 int iCur, /* Index of the new VdbeCursor */
178177 int nField, /* Number of fields in the table or index */
178179 u8 eCurType /* Type of the new cursor */
178181 /* Find the memory cell that will be used to store the blob of memory
178239 ** Return the symbolic name for the data type of a pMem
178354 +** Mark the beginning of a subroutine that can be entered in-line
178365 +** the OP_Return opcode has a P3 value of 1). Thus if the subroutine is
178387 ** P4 points to a blob of data P1 bytes long. Store this
178413 ** Make a copy of registers P1..P1+P3 into registers P2..P2+P3.
178415 +** If the 0x0002 bit of P5 is set then also clear the MEM_Subtype flag in the
178416 +** destination. The 0x0001 bit of P5 indicates that this Copy opcode cannot
178420 ** This instruction makes a deep copy of the value. A duplicate
178421 ** is made of any string or blob constant. See also OP_SCopy.
178448 -** This opcode is a variant of OP_ResultRow that checks the foreign key
178453 +** to returning results such as a row change count or the result of a
178481 - /* Make sure the results of the current row are \000 terminated
178497 - ** APIs might have caused type conversions of made other changes to
178510 + ** APIs might have caused type conversions of made other changes to
178551 /* Common case of comparison of two integers */
178608 ** The first integer in the P4 integer array is the length of the array
178609 ** and does not become part of the permutation.
178674 u32 *aOffset; /* aOffset[i] is offset to start of data for i-th column */
178675 int len; /* The length of the serialized data for the column */
178710 /* For the special case of as pseudo-cursor, the seekResult field
178764 ** need to cover the header of the record. If pC->aRow does not contain
178775 /* Make sure at least the first p2+1 entries of the header have been
178829 Mem *pLast; /* Last field of the record */
178830 int nField; /* Number of fields in the record */
178833 u32 len; /* Length of a field */
178834 u8 *zHdr; /* Where to write next byte of the header */
178835 u8 *zPayload; /* Where to write next byte of the payload */
178933 ** Store the number of entries (an integer value) in the table or index
179134 + /* Key values in an array of registers */
179166 - /* For the OP_NoConflict opcode, take the jump if any of the
179203 + /* For the OP_NoConflict opcode, take the jump if any of the
179225 +** Synopsis: r[P2]=PX rowid of P1
179227 ** Store in register P2 an integer which is the key of the table entry that
179244 + /* If the cursor is not already open, create a special kind of
179269 -** P4 is always of type P4_ADVANCE. The function pointer points to
179286 -** P4 is always of type P4_ADVANCE. The function pointer points to
179371 /* End of inlined sqlite3VdbeIdxKeyCompare() */
179411 +** sqlite3_vtab_in_next() to extract all of the values stored in the P1
179479 - /* Copy the result of the function into register P3 */
179626 -#define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */
179638 +#define P4_INTARRAY (-14) /* P4 is a vector of 32-bit integers */
179669 u8 eCurType; /* One of the CURTYPE_* values above */
179670 - i8 iDb; /* Index of cursor database in db->aDb[] (or -1) */
179671 + i8 iDb; /* Index of cursor database in db->aDb[] */
179679 - Bool hasBeenDuped:1; /* This cursor was source or target of OP_OpenDup */
179691 ** Vdbe.cacheCtr. Vdbe.cacheCtr will never take on the value of
179709 + int n; /* Number of characters in string value, excluding '\0' */
179710 u16 flags; /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */
179713 - int n; /* Number of characters in string value, excluding '\0' */
179718 int szMalloc; /* Size of the zMalloc allocation */
179724 Mem *pScopyFrom; /* This Mem is a shallow copy of pScopyFrom */
179726 ** Size of struct Mem not including the Mem.zMalloc member or anything that
179732 -/* One or more of the following flags are set to indicate the validOK
179733 +/* One or more of the following flags are set to indicate the
179734 ** representations of the value stored in the Mem struct.
179759 +** * MEM_Blob|MEM_Zero A blob in Mem.z of length Mem.n plus
179782 #define MEM_AffMask 0x003f /* Mask of affinity bits */
179784 +/* Extra bits that modify the meanings of the core datatypes above
179790 -#define MEM_TypeMask 0xc1bf /* Mask of type bits */
179793 +#define MEM_Zero 0x0400 /* Mem.i contains count of 0s appended to blob */
179795 +#define MEM_TypeMask 0x0dbf /* Mask of type bits */
179797 -/* Whenever Mem contains a valid string or blob representation, one of
179809 -#define MEM_Zero 0x4000 /* Mem.i contains count of 0s appended to blob */
179830 +** A Memory cell is initialized if at least one of the
179842 int iOp; /* Instruction number of OP_Function */
179846 u8 argc; /* Number of arguments */
179849 Vdbe *pPrev,*pNext; /* Linked list of VDBEs with the same Vdbe.db */
179851 ynVar nVar; /* Number of entries in aVar[] */
179852 - u32 iVdbeMagic; /* Magic number defining state of the SQL statement */
179853 int nMem; /* Number of memory locations currently allocated */
179854 int nCursor; /* Number of slots in apCsr[] */
179857 u8 errorAction; /* Recovery action to do in case of an error */
179861 + u8 eVdbeState; /* On of the VDBE_*_STATE values */
179869 yDbMask btreeMask; /* Bitmask of db->aDb[] entries referenced */
179870 yDbMask lockMask; /* Subset of btreeMask that requires a lock */
179873 char *zSql; /* Text of the SQL statement that generated this */
179875 char *zNormSql; /* Normalization of the associated SQL statement */
179900 +** An instance of this object is used to pass an vector of values into
179901 +** OP_VFilter, the xFilter method of a virtual table. The vector is the
179902 +** set of values on the right-hand side of an IN constraint.
179907 +** and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces
179909 +** right operand of the IN constraint.
179917 +/* Size of content associated with serial types that fit into a
179981 u8 enc, /* Encoding of z. 0 for BLOBs */
180047 - ** be called automatically instead of throwing the SQLITE_MISUSE error.
180056 - ** legacy behavior of returning SQLITE_MISUSE for cases where the
180159 + ** be called automatically instead of throwing the SQLITE_MISUSE error.
180168 + ** legacy behavior of returning SQLITE_MISUSE for cases where the
180231 +** Implementation of sqlite3_vtab_in_first() (if bNext==0) and
180255 + u32 sz; /* Size of current row in bytes */
180256 + Mem sMem; /* Raw content of current row */
180296 ** is requested more than once within the same run of a single prepared
180447 - /* The code generator never codes any of these opcodes as a jump
180456 - /* The code generator never codes any of these opcodes as a jump
180482 +** Check to see if a subroutine contains a jump to a location outside of
180486 +** The subroutine consists of opcodes between iFirst and iLast. Jumps to
180488 +** that contains the return address. Jumps to outside the range of iFirst
180496 +** This routine only runs during debug builds. The purpose is (of course)
180497 +** to detect invalid escapes out of a subroutine. The OP_Halt opcode
180503 + int iFirst, /* First opcode of the subroutine */
180504 + int iLast, /* Last opcode of the subroutine */
180565 ** Return the address of the next instruction to be inserted.
180610 u32 mask, /* Mask of registers to NOT release */
180674 ** Initialize an array of N Mem element.
180685 +** All other fields of Mem can safely remain uninitialized for now. They
180709 -** Release an array of N Mem elements
180710 +** Release auxiliary memory held in an array of N Mem elements.
180761 - sqlite3_int64 nByte /* Bytes of memory needed */
180762 + sqlite3_int64 nByte /* Bytes of memory needed. */
180801 ** of the prepared statement.
180803 - n = ROUND8(sizeof(Op)*p->nOp); /* Bytes of opcode memory used */
180804 + n = ROUND8P(sizeof(Op)*p->nOp); /* Bytes of opcode memory used */
180807 x.nFree = ROUNDDOWN8(pParse->szOpAlloc - n); /* Bytes of unused memory */
180919 ** To look at it another way, this routine resets the state of the
180971 ** VdbeDelete() also unlinks the Vdbe from the list of VMs associated with
181087 +** sqlite3VdbeSerialPut() <--- in-lined into OP_MakeRecord as of 2022-04-02
181121 -** Return the number of bytes written.
181123 -** nBuf is the amount of space left in buf[]. The caller is responsible
181125 -** of the pMem->u.nZero bytes for a MEM_Zero value.
181127 -** Return the number of bytes actually written into buf[]. The number
181128 -** of bytes in the zero-filled tail is included in the return value only
181168 /* Input "x" is a sequence of unsigned characters that represent a
181174 -** and store the result in pMem. Return the number of bytes read.
181179 ** routine so that in most cases the overhead of moving the stack pointer
181292 int nByte; /* Number of bytes required for *p */
181429 /* The index entry must begin with a header size */
181438 /* Fetch the integer off the end of the index record */
181576 ** If the double is out of range of a 64-bit signed integer then
181602 ** is required to store the string, then value of pMem is unchanged. In
181608 +** If n is negative, then the string consists of all bytes up to but
181660 /* The following block sets the new values of Mem.z and Mem.xDel. It
181857 + u32 mIn; /* Mask of terms that are <col> IN (...) */
181864 /* Forward declaration of methods */
181982 - Bitmask notReady /* Tables in outer loops of the join */
181985 + const Bitmask notReady /* Tables in outer loops of the join */
181995 - ** the RHS of a LEFT JOIN. Such a term can only be used if it is from
182014 ** makes use of the automatic index.
182021 - Bitmask notReady, /* Mask of cursors that are not available */
182024 + const Bitmask notReady, /* Mask of cursors that are not available */
182027 int nKeyCol; /* Number of columns in the constructed index */
182034 - || pLoop->prereq!=0 ); /* table of a LEFT JOIN */
182040 + ** WHERE clause (or the ON clause of a LEFT join) that constrain which
182041 + ** rows of the target table (pSrc) that can be used. */
182100 + int addrOnce; /* Address of opening OP_Once */
182101 + int addrTop; /* Address of OP_Rewind */
182125 + ** to zero-filled blob of at least 80K bits, but maybe more if the
182126 + ** estimated size of the table is larger. We could actually
182127 + ** measure the size of the table at run-time using OP_Count with
182191 + ** not able to do early evaluation of bloom filters that make use of
182204 ** responsibility of the caller to eventually release the structure
182215 u16 *pmNoOmit /* Mask of terms not to omit */
182236 - /* Count the number of possible WHERE clause constraints referring
182239 + ** Mark each term with the TERM_OK flag. Set nTerm to the number of
182258 + ** right-hand table of a LEFT JOIN nor to the either table of a
182301 + ** of the COLLATE operator matches the collation of the column. */
182317 + /* No matches cause a break out of the loop */
182339 sqlite3ErrorMsg(pParse, "out of memory");
182368 - ** right-hand table of a LEFT JOIN. See tag-20191211-001 for the
182454 /* Do a binary search to find the first sample greater than or equal
182455 ** to pRec. If pRec contains a single field, the set of samples to search
182568 - ** be used by the right table of a LEFT JOIN. Only constraints in the
182574 + ** be used by the right table of a LEFT JOIN nor by the left table of a
182579 + ** for an example of a WHERE clause constraints that may not be used on
182580 + ** the right table of a RIGHT JOIN because the constraint implies a
182581 + ** not-NULL condition on the left table of the RIGHT JOIN.
182604 - int isLeft, /* True if iTab is the right table of a LEFT JOIN */
182606 WhereClause *pWC, /* The WHERE clause of the query */
182635 if( !pBuilder->pOrSet /* Not part of an OR optimization */
182644 + && (pSrc->fg.jointype & JT_RIGHT)==0 /* Not the right tab of a RIGHT JOIN */
182647 LogEst rLogSize; /* Logarithm of the number of rows in the table */
182665 + /* Do not do an SCAN of a index-on-expression in a RIGHT JOIN
182744 ** consume the ORDER BY clause because (1) the order of IN terms
182745 ** is not necessarily related to the order of output terms and
182754 + ** xFilter for each value on the RHS of the IN) and a LIMIT or
182774 -** returns a pointer to a buffer containing the name of the collation
182775 -** sequence associated with element iCons of the sqlite3_index_info.aConstraint
182776 -** array. Or, if iCons is out of range or there is no active xBestIndex
182821 +** on the right-hand-side of constraint iCons.
182824 + sqlite3_index_info *pIdxInfo, /* Copy of first argument to xBestIndex */
182890 ** Add all WhereLoop objects for a table of the join identified by
183021 - ** right-hand-side of a LEFT or CROSS JOIN. */
183027 + /* Add prerequisites to prevent reordering of FROM clause terms
183029 + ** prevents the right operand of a RIGHT JOIN from being swapped with
183033 + ** prevent FROM-clause terms from moving from the right side of
183034 + ** a LEFT JOIN over to the left side of that join if the LEFT JOIN
183035 + ** is itself on the left side of a RIGHT JOIN.
183129 +** 2) The table must be the RHS of a LEFT JOIN.
183131 +** must contain a constraint that limits the scan of the table to
183133 +** 4) The table must not be referenced by any part of the query apart
183166 + ** condition (1) of the header comment */
183220 +** of rows in the table that is being considered for the Bloom
183222 +** (2) Some searches are expected to find zero rows. (This is determined
183226 +** (4) The size of the table being searched is known by ANALYZE.
183228 +** This block of code merely checks to see if a Bloom filter would be
183230 +** WhereLoop. The implementation of the Bloom filter comes further
183270 ** Generate the beginning of the loop used for WHERE clause processing.
183281 /* An ORDER/GROUP BY clause of more than 63 terms cannot be optimized */
183292 /* The number of tables in the FROM clause is limited by the number of
183343 /* Analyze all of the subexpressions. */
183394 - ** 2) The table must be the RHS of a LEFT JOIN.
183396 - ** must contain a constraint that limits the scan of the table to
183398 - ** 4) The table must not be referenced by any part of the query apart
183490 if( sqlite3WhereTrace & 0x100 ){ /* Display all terms of the WHERE clause */
183491 sqlite3DebugPrintf("---- WHERE clause at end of analysis:\n");
183511 /* If we know that only a prefix of the record will be used,
183550 + /* The nature of RIGHT JOIN processing is such that it messes up
183601 +** Return true if cursor iCur is opened by instruction k of the
183602 +** bytecode. Used inside of assert() only.
183620 ** Generate the end of the WHERE loop. See comments on
183635 + /* Terminate the subroutine that forms the interior of the loop of
183681 - /* The "break" point is here, just past the end of the outer loop.
183696 + ** unmatched rows of the right operand of the RIGHT JOIN with
183697 + ** all of the columns of the left operand set to NULL.
183704 /* For a co-routine, change all OP_Column references to the table of
183705 ** the co-routine into OP_Copy of result contained in a register.
183712 - /* Close all of the cursors that were opened by sqlite3WhereBegin.
183735 ** from the index instead of from the table where possible. In some cases
183778 + /* The "break" point is here, just past the end of the outer loop.
183803 +** This object is a header on a block of allocated memory that will be
183808 + u64 sz; /* Bytes of space */
183830 u8 iFrom; /* Which entry in the FROM clause */
183831 u8 op, p3, p5; /* Opcode, P3 & P5 of the opcode that ends the loop */
183832 int p1, p2; /* Operands of the opcode used to end the loop */
183843 + u32 mHandleIn; /* Terms to handle as IN(...) instead of == */
183860 +#define TERM_SLICE 0x8000 /* One slice of a row-value/vector comparison */
183863 ** An instance of the WhereScan object is used as an iterator for locating
183872 unsigned char nEquiv; /* Number of entries in aiCur[] and aiColumn[] */
183881 int nTerm; /* Number of terms */
183882 int nSlot; /* Number of entries in a[] */
183883 + int nBase; /* Number of terms through the last non-Virtual */
183884 WhereTerm *a; /* Each a[] describes a term of the WHERE cluase */
183909 ExprList *pResultSet; /* Result set of the query */
183916 int iBreak; /* Jump here to break out of the loop */
183918 int iEndWhere; /* End of the WHERE clause itself */
183919 WhereLoop *pLoops; /* List of all WhereLoop objects */
183922 Bitmask revMask; /* Mask of ORDER BY terms that need reversing */
183923 WhereClause sWC; /* Decomposition of the WHERE clause */
183926 u32 op, /* Mask of WO_xx values describing operator */
183973 -#define WO_ALL 0x1fff /* Mask of all possible WO_* values */
183974 +#define WO_ALL 0x3fff /* Mask of all possible WO_* values */
183975 #define WO_SINGLE 0x01ff /* Mask of all non-compound WO_* values */
183979 #define WHERE_BIGNULL_SORT 0x00080000 /* Column nEq of index is BIGNULL */
184208 ** However, if the scan currently being coded is a branch of an OR-loop and
184209 -** the statement currently being coded is a SELECT, then P3 of OP_DeferredSeek
184210 -** is set to iIdxCur and P4 is set to point to an array of integers
184211 -** containing one entry for each column of the table cursor iCur is open
184212 -** on. For each table column, if the column is the i'th column of the
184213 -** index, then the corresponding array entry is set to (i+1). If the column
184214 -** does not appear in the index at all, the array entry is set to 0.
184218 +** enable this optimization, the P3 of OP_DeferredSeek is set to iIdxCur
184219 +** and P4 is set to an array of integers containing one entry for each column
184221 +** column of the index, then the corresponding array entry is set to (i+1).
184222 +** If the column does not appear in the index at all, the array entry is set
184275 + int iLevel, /* Which level of pWInfo->a[] should be coded */
184320 ** Generate code for the start of the iLevel-th loop in the WHERE clause
184324 ** row of the left table of the join.
184342 /* Special case of a FROM clause subquery implemented as a co-routine */
184406 Expr *pRight; /* RHS of the comparison */
184407 VdbeOp *pOp; /* Opcode to access the value of the IN constraint */
184413 - ** encoding of the value in the register, so it *must* be reloaded. */
184417 + ** encoding of the value in the register, so it *must* be reloaded.
184518 ** The OR-optimization doesn't work for the right hand table of
184528 /* If the original WHERE clause is z of the form: (x1 OR x2 OR ...) AND y
184536 ** is not contained in the ON clause of a LEFT JOIN.
184539 + ** 2022-02-04: Do not push down slices of a row-value comparison.
184540 + ** In other words, "w" or "y" may not be a slice of a vector. Otherwise,
184541 + ** the initialization of the right-hand operand of the vector comparison
184571 Expr *pDelete; /* Local copy of OR clause term */
184572 int jmp1 = 0; /* Address of jump operation */
184595 + /* Set the P2 operand of the OP_Return opcode that will end the current
184596 + ** loop to point to this spot, which is the top of the next containing
184672 + /* pTab is the right-hand table of the RIGHT JOIN. Generate code that
184673 + ** will record that the current row of that table has been matched at
184704 ** at least one row of the right table has matched the left table.
184718 + ** of the RIGHT JOIN. During normal operation, the subroutine will
184719 + ** be in-line with the rest of the code. But at the end, a separate
184721 + ** of pTab, with all tables to left begin set to NULL.
184731 + ** to the results of the OUTER JOIN. The following loop generates the
184986 - ** on left table of a LEFT JOIN. Ticket #3015 */
185004 + ** on left table of a LEFT JOIN. Ticket #3015 */
185010 + /* The ON clause of an INNER JOIN references a table to its right.
185045 ** This is only required if at least one side of the comparison operation
185108 + int iReg, /* Register that will hold value of the limit/offset */
185142 +** Possibly add terms corresponding to the LIMIT and OFFSET clauses of the
185155 +** LIMIT and OFFSET terms are ignored by most of the planner code. They
185156 +** exist only so that they may be passed to the xBestIndex method of the
185157 +** single virtual table in the FROM clause of the SELECT.
185269 +** Return a Bitmask of all tables referenced by Expr. Expr can be
185279 +** Return a Bitmask of all tables referenced by every expression
185418 /* The inline versions of min() and max() require a single ephemeral
185979 +# The author disclaims copyright to this source code. In place of
185983 +# May you find forgiveness for yourself and forgive others.
186665 +# The author disclaims copyright to this source code. In place of
186669 +# May you find forgiveness for yourself and forgive others.
187134 +# The author disclaims copyright to this source code. In place of
187138 +# May you find forgiveness for yourself and forgive others.
187248 +# The author disclaims copyright to this source code. In place of
187252 +# May you find forgiveness for yourself and forgive others.
187321 +# When the stay-on-last page optimization of sqlite3BtreeIndexMoveto() is
187374 +# no direct changes to the content of the database file.
187407 +# change the configuration of a database connection, they do not make
187408 +# changes to the content of the database files on disk.
187419 +# the timing of when other statements modify the database.
187456 +# The author disclaims copyright to this source code. In place of
187460 +# May you find forgiveness for yourself and forgive others.
187720 # one way or the other, and it must have a value of 0 or 1.
187739 -# in DST giving a 4 hour offset instead of 5. In 2007, DST was extended to
187750 -# more confusion/reports of the issue.
187751 +# (1) Localtime is 30 minutes earlier than (west of) UTC on
187777 +# (2) Localtime is 30 minutes later than (east of) UTC on odd days.
187780 +# of 2000-05-29 14:16:00 in order to test the ability of
187883 -# These two are a bit of a scam. They are added to ensure that 100% of
187885 -# is not -0400 (the condition for running of the block of tests above).
187900 +# the same localtime of 2022-02-11 00:15:00. When converting from
187901 +# that localtime back to UTC, we should get one or the other of
187912 +# Modifiers work for dates that are way out of band for localtime_r()
187919 +# Restore the use of the OS localtime_r() before going on...
187924 @@ -607,6 +539,9 @@ datetest 17.5 {datetime(2457828,'start of year')} {2017-01-01 00:00:00}
187925 datetest 17.6 {datetime(37,'start of year')} NULL
187926 datetest 17.7 {datetime(38,'start of year')} {-4712-01-01 00:00:00}
187943 +# The author disclaims copyright to this source code. In place of
187947 +# May you find forgiveness for yourself and forgive others.
187952 +# focus of this file is testing date and time functions.
187984 +# timestamp - the number of seconds since 1970-01-01 00:00:00 UTC.
188006 +# EVIDENCE-OF: R-07289-49223 For numeric values outside of the range of
188007 +# valid julian day numbers, but within the range of -210866760000 to
188011 +# EVIDENCE-OF: R-20795-34947 Other numeric values are out of range and
188055 +# Unix Time - the number of seconds since 1970.
188061 +# follow the initial time-value which must be of the form DDDDDDDDD.
188063 +# EVIDENCE-OF: R-31176-64601 Any other use of the 'julianday' modifier
188079 +# EVIDENCE-OF: R-33431-18865 Unix timestamps for the first 63 days of
188187 -# Test that the results of all binary operators are either numeric or
188191 -# EVIDENCE-OF: R-20665-17792 The result of any binary operator is either
188194 +# EVIDENCE-OF: R-15904-00746 The result of any binary operator is either
189129 +# The author disclaims copyright to this source code. In place of
189133 +# May you find forgiveness for yourself and forgive others.
189138 +# focus of this script is testing the FTS3 module.
189265 } {1 {wrong number of arguments to function replace()}}
189398 int nSql; /* Number of SQL scripts */
189401 + unsigned int nInvariant; /* Number of invariant checks run */
189402 char zTestName[100]; /* Name of current test */
189426 +#define BTS_BADPRAGMA 0x000008 /* Sticky for rest of the script */
189587 + int nRow, /* Total number of output rows */
189653 int nSql; /* Bytes of SQL text */
189697 printf("fuzzcheck: 0 errors out of %d tests in %d.%03d seconds\n"
190281 z=yQRo{of>0A7%!~%~&JI36Kl5H(M$q91f7%z?2Z#$6euMJkNZyus45DSsuyYvs&`E
190288 zRfR?SaSn|bC=Z0XQSx%Q^ObL9h}|f+fWBSj=2$~po)bx=+5`U0gwI;Z7txl^X)S-q
191192 z*6M0#cwgR0#<L@YgHZY*M!+K<qH`_|Vi>5Yd`dTk1NkG_gN%ik@1p))C=a;$k=%of
191596 zeiJIY=_j!Rx>PHfr?c1h?rgzX+`g=H^=iBsJUFc;po^{{=bcf1<ww7uhVT0V8SD09
192409 zUSuy)t!=d~po>j<;FaU!$Cgf>T4J>hgZ0V!7@85I|9~f-(UK>vk8^Z?lD<*I9Hz{y
192784 z`$ANf;yyk#<jdnXl;DkI;5G7lIb%6po=DtJaW9BUWx}wsNKRgzj@KpQ<wXeKtBBlt
193301 zd>A~u+$Wd<O2O8%AZvEmm-iq5MDPu`e;1or)of^b#U}_Zd?5xxYg1S^3Z+5@<*R+@
193350 zt}0X~kiba@xbE{4=@?}TM91tj_&po?2pLmsTZ`V(*F-+vHbd!MW0rfp<GCfh_HkP{
193540 z{E;sb^}(uR;iDK(P1+3#cSc>of>>%-^`X9yG2EC6o~Gubcz2V@F0xEiOA@H?daumX
194237 +** The author disclaims copyright to this source code. In place of
194241 +** May you find forgiveness for yourself and forgive others.
194251 +** * Record the output of the current row
194273 +** is known to be corrupt. A value of non-zero means "yes, the database
194275 +** database is corrupt". The value might be set prior to entry, or this
194282 +** SQLITE_DONE iCnt is out of range.
194286 +** be the cause of the malfunction.
194292 +** (other) Some other kind of error occurred.
194299 + int nRow, /* Number of output rows from pStmt */
194376 + printf("invariant-error ignored due to the use of virtual tables\n");
194387 +** Return 0 if the iCnt is out of range.
194466 + /* Comparison of numerics is ok */
194546 +** Report a failure of the invariant: The current output row of pOrig
194547 +** does not appear in any row of the output from pTest.
194691 +# Cannot do a scan of a partial index on the left table of a RIGHT JOIN
194756 # focus of this file is testing the INSERT transfer optimization.
195163 +# The author disclaims copyright to this source code. In place of
195167 +# May you find forgiveness for yourself and forgive others.
195524 +# The author disclaims copyright to this source code. In place of
195528 +# May you find forgiveness for yourself and forgive others.
195555 +# RIGHT JOIN body subroutine before the first use of any register containing
195556 +# the results of that subroutine. This seems dodgy. Test case:
195657 +# 2022-04-21 dbsqlfuzz find
195807 +# 2022-05-13 The idea of reusing subquery cursors does not
195921 +# previous three cases. However, historical versions of SQLite have always
196220 +# Restrictions on the usage of WHERE clause constraints by joins that are
196334 +# The author disclaims copyright to this source code. In place of
196338 +# May you find forgiveness for yourself and forgive others.
196905 +# The author disclaims copyright to this source code. In place of
196909 +# May you find forgiveness for yourself and forgive others.
197126 +# The author disclaims copyright to this source code. In place of
197130 +# May you find forgiveness for yourself and forgive others.
197140 +# 1. Run a TCL script (included at the bottom of this file) that
204383 +# The author disclaims copyright to this source code. In place of
204387 +# May you find forgiveness for yourself and forgive others.
204397 +# 1. Run a TCL script (included at the bottom of this file) that
208984 +# The author disclaims copyright to this source code. In place of
208988 +# May you find forgiveness for yourself and forgive others.
208998 +# 1. Run a TCL script (included at the bottom of this file) that
244123 +# The author disclaims copyright to this source code. In place of
244127 +# May you find forgiveness for yourself and forgive others.
244137 +# 1. Run a TCL script (included at the bottom of this file) that
244572 +# The author disclaims copyright to this source code. In place of
244576 +# May you find forgiveness for yourself and forgive others.
244586 +# 1. Run a TCL script (included at the bottom of this file) that
245191 +# The author disclaims copyright to this source code. In place of
245195 +# May you find forgiveness for yourself and forgive others.
245414 # This is the example from pages 2 and 3 of RFC-7396
245430 # This is the example from pages 2 and 3 of RFC-7396
245440 set answers [list {1 {out of memory}} {0 {}}]
245453 +# The author disclaims copyright to this source code. In place of
245457 +# May you find forgiveness for yourself and forgive others.
245521 +# The author disclaims copyright to this source code. In place of
245525 +# May you find forgiveness for yourself and forgive others.
245733 # focus of this file is testing the printf() SQL function.
245988 +# The author disclaims copyright to this source code. In place of
245992 +# May you find forgiveness for yourself and forgive others.
246270 -} {1 {Error: mode should be one of: ascii box column csv html insert json line list markdown quote…
246271 +} {1 {Error: mode should be one of: ascii box column csv html insert json line list markdown qbox …
246274 -} {1 {Error: mode should be one of: ascii box column csv html insert json line list markdown quote…
246275 +} {1 {Error: mode should be one of: ascii box column csv html insert json line list markdown qbox …
246283 -} {1 {Error: mode should be one of: ascii box column csv html insert json line list markdown quote…
246284 +} {1 {Error: mode should be one of: ascii box column csv html insert json line list markdown qbox …
246292 -} {1 {Error: mode should be one of: ascii box column csv html insert json line list markdown quote…
246293 +} {1 {Error: mode should be one of: ascii box column csv html insert json line list markdown qbox …
246304 -} {1 {Error: mode should be one of: ascii box column csv html insert json line list markdown quote…
246307 -} {1 {Error: mode should be one of: ascii box column csv html insert json line list markdown quote…
246312 # .nullvalue STRING Print STRING in place of NULL values
246329 +# Test the output of ".mode quote"
246370 -} {1 {Error: near line 9: stepping, too many levels of trigger recursion (1)}}
246371 +} {1 {Runtime error near line 9: too many levels of trigger recursion}}
246420 +# Test for rejection of incomplete input at EOF.
246468 # shell4-3.*: The ".read" command takes the shell out of interactive mode
246965 # Find the name of the 'shell' executable (e.g. "sqlite3.exe") to use for
246975 +# Find invocation of the 'shell' executable (e.g. "sqlite3.exe") to use
247006 # Find the name of the 'sqldiff' executable (e.g. "sqlite3.exe") to use for
247145 +# The author disclaims copyright to this source code. In place of
247149 +# May you find forgiveness for yourself and forgive others.
247394 +# The author disclaims copyright to this source code. In place of
247398 +# May you find forgiveness for yourself and forgive others.
247441 +# The author disclaims copyright to this source code. In place of
247445 +# May you find forgiveness for yourself and forgive others.
247464 +# interface is invoked from within the xBestIndex method of a virtual
247465 +# table implementation, with P being a copy of the sqlite3_index_info
247468 +# of the right-hand operand of that constraint if the right-hand operand
248230 # focus of this file is testing the use of indices in WHERE clases.
248297 +# index of the OR branch in which the subquery is coded. If the
248420 +# The author disclaims copyright to this source code. In place of
248424 +# May you find forgiveness for yourself and forgive others.
248553 +# 2022-04-22: Do not allow flattening of a MATERIALIZED CTE into
248659 +** where OPTIONS are zero or more of:
248663 ** The translation of the database appears on standard output. If the
248670 long szFile; /* Size of the input file in bytes */
248714 /* Generate a table containing the symbolic name of every symbol
248768 +** To modify this header, edit any of the various lists in that script
248769 +** which specify categories of generated conditionals in this file.
248779 +** The author disclaims copyright to this source code. In place of
248783 +** May you find forgiveness for yourself and forgive others.
248802 +/* These macros are provided to \"stringify\" the value of the define
248815 +** An array of names of all compile-time options. This array should
248819 +** only a handful of compile-time options, so most times this array is usually
249014 - u32 parent, /* Parent of this page. 0 for root pages */
249015 + int parent, /* Parent of this page. 0 for root pages */
249016 int idx, /* Which child of the parent */
249017 const char *zName /* Name of the table */
249025 page_usage_msg(pgno, "freelist trunk #%d child of %d", cnt, parent);
249238 // Add the bundle's Resources dir to the beginning of the search path.
249533 + consumer_provider_mappings.find(window1.get()));
249552 + consumer_provider_mappings.find(window2.get()));
249558 + event_provider_mappings.find(press2.unique_event_id()));
249560 + // Before ACKing `press2`, replacing the gesture provider of `window2` with a
249725 // The source of the data.
249733 +// Use of this source code is governed by a BSD-style license that can be
249880 +// Use of this source code is governed by a BSD-style license that can be
250028 + // Returns true if the data on top of the clipboard stack has format |format|
250059 + // So now we always get data from system clipboard instead of cache data.
250107 + data = "<span>" + *text + "</span>";
250374 + UBool img_matched = img_regex_matcher->find(0, status);
250389 + img_src_matched = img_src_regex_matcher->find(0, status);
250404 + img_matched = img_regex_matcher->find(end_index, status);
250417 + img_src_set.find(img_path);
250426 + // This is a raw pointer instead of a std::unique_ptr to avoid adding a
250694 \ No newline at end of file
250702 +// Use of this source code is governed by a BSD-style license that can be
250724 + // the current thread is in fact an instance of ClipboardOHOS.
250817 \ No newline at end of file
250825 +// Use of this source code is governed by a BSD-style license that can be
250877 + FileUrlMap::iterator iter = file_map_.find(new_uri);
250938 + find_uri_map_iter = uri_map.find(iter->second);
250957 \ No newline at end of file
250965 +// Use of this source code is governed by a BSD-style license that can be
251013 \ No newline at end of file
251123 // of lacros-chrome is complete.
251179 // Provides gesture detection and dispatch given a sequence of touch events
251232 // Convenience method to find the GestureEventHelper that can dispatch events
251582 // Chromium code. Also one per plane per entry.
251696 # Can be overriden to test during bring up of EGL support on other platforms.
251710 +// Use of this source code is governed by a BSD-style license that can be
251806 +// Use of this source code is governed by a BSD-style license that can be
251875 +// Use of this source code is governed by a BSD-style license that can be
251899 +// Use of this source code is governed by a BSD-style license that can be
251953 +// Use of this source code is governed by a BSD-style license that can be
251972 + auto it = native_window_map_.find(native_window_id);
251978 \ No newline at end of file
251986 +// Use of this source code is governed by a BSD-style license that can be
252010 \ No newline at end of file
252029 // and link with Android implementations of Chrome which do not have
252266 // Returns the transparent horizontal padding ratio of the handle drawable.
252795 +// For serializing JSArrayBufferView flags. Instead of serializing /
252952 + CHECK_NE(toString16(message->string()).find(expected_response_matcher_),
253003 +// Use of this source code is governed by a BSD-style license that can be