Skip to content

Instantly share code, notes, and snippets.

View Maksold's full-sized avatar

Maksim Soldatjonok Maksold

  • Latvia
View GitHub Profile
@Maksold
Maksold / Database Fix for AUTO_INCREMENT exceeds max value.md
Last active February 27, 2024 13:25 — forked from JesKingDev/Database Fix for AUTO_INCREMENT exceeds max value.md
Data fix for the scenarios where gaps in a table's auto_increment result in the next value exceeding the max size of an INT. Specifically helps address the Magento Issue - AUTO_INCREMENT grows on every INSERT ... ON DUPLICATE on InnoDB tables #28387 https://github.com/magento/magento2/issues/28387

AUTO_INCREMENT grows on every INSERT ... ON DUPLICATE on InnoDB tables #28387

magento/magento2#28387

Symptom:

General system exception happened. SQLSTATE[22003]: Numeric value out of range: 167 Out of range value for column 'value_id' at row 1, query was: INSERT INTO catalog_product_entity_varchar (entity_id,attribute_id,store_id,value) VALUES (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (

--- ext/intl/breakiterator/codepointiterator_internal.cpp
+++ ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -67,21 +67,25 @@
}
CodePointBreakIterator::~CodePointBreakIterator()
{
if (this->fText) {
utext_close(this->fText);
}
--- /ext/intl/breakiterator/codepointiterator_internal.cpp
+++ /ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -67,21 +67,25 @@
}
CodePointBreakIterator::~CodePointBreakIterator()
{
if (this->fText) {
utext_close(this->fText);
}
diff --git a/ext/intl/breakiterator/codepointiterator_internal.cpp b/ext/intl/breakiterator/codepointiterator_internal.cpp
index 723cfd5022..f6f75d2731 100644
--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -74,7 +74,11 @@ CodePointBreakIterator::~CodePointBreakIterator()
clearCurrentCharIter();
}
+#if U_ICU_VERSION_MAJOR_NUM >= 70
+bool CodePointBreakIterator::operator==(const BreakIterator& that) const
diff --git a/ext/intl/breakiterator/codepointiterator_internal.cpp b/ext/intl/breakiterator/codepointiterator_internal.cpp
index 723cfd5022..f6f75d2731 100644
--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -74,7 +74,11 @@ CodePointBreakIterator::~CodePointBreakIterator()
clearCurrentCharIter();
}
+#if U_ICU_VERSION_MAJOR_NUM >= 70
+bool CodePointBreakIterator::operator==(const BreakIterator& that) const
@Maksold
Maksold / local.xml
Last active May 28, 2021 20:02
#magento #xml - local.xml boilerplate
<?xml version="1.0"?>
<layout>
<default>
<!--Root/Default Layouts-->
<reference name="root">
<!--Appending Block-->
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</reference>
<!--CSS and JS Files-->
@Maksold
Maksold / data-install-0.0.1.php
Last active October 25, 2018 12:51
#magento - Create Transactional Email in #migration script
<?php
/** @var $installer Scandi_Migrations_Model_Resource_Setup */
$installer = $this;
$installer->startSetup();
$templates = array(
array(
"name" => "New Invoice",
"code" => "sales_email_invoice_template",
"config" => "sales_email/invoice/template",
@Maksold
Maksold / mysql4-install-1.0.6.php
Last active October 25, 2018 12:50
#magento - Interakting slider fix bug with installation
<?php
/**
* Interakting Slider
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
@Maksold
Maksold / Navigation.php
Last active October 25, 2018 12:50
#magento - get previous/next #category
<?php
/**
* Additional Methods for Mage Core Navigation
*
* @category Scandi
* @package Scandi_Extends
*/
class Scandi_Extends_Block_Catalog_Navigation extends Mage_Catalog_Block_Navigation
{
private function getCategoryByPositionOffset($offset)
@Maksold
Maksold / list.phtml
Last active October 25, 2018 12:49
#magento - remove product_list_toolbar
<?php if (!$this->getHideToolbar()): ?>
<?php echo $this->getToolbarHtml() ?>
<?php endif ?>